Why
Most tools for running more than one Claude account are built for the terminal, or swap your login and restart the app. claude-hats runs inside Claude Code itself, including the Claude desktop app. Each account is a hat: you stay in the same app and the same session, and only the account behind each request changes. Your ~/.claude folder, skills, settings and sessions stay exactly as they are.
What it does
| |
|---|
| Usage, always in view | A row above the message box shows each account's weekly usage. Press an account to open its 5-hour, weekly and Fable limits, with when each one resets and a warning when it would run out before then. |
| One-press switching | Use this account sends your next message from that account. You don't log out, open a second window or restart. The quick button on the row recommends the account with the most room left. |
| Any number of accounts | Add, rename and remove them right in the row. It stays on one line however many you have. |
| Nothing else to install | The figures come from the rate-limit headers on Claude's own responses, plus Anthropic's own usage report for the account the app is signed in to. There is no other tool to set up. |
| A small companion | A character on the row acts out what Claude is doing (thinking, reading, writing, running a command, looking something up) and gets uneasy as the account in use runs low. |
The row closed, with an account opened, and with many accounts. An illustration drawn with the plugin's own graphics.
Install
In a terminal session of Claude Code, at the prompt:
/plugin install hats --marketplace Akramovic1/claude-hats
Or from a shell:
claude plugin install hats --marketplace Akramovic1/claude-hats
In the desktop app, where /plugin does not run: click + next to the prompt box, then Plugins, Add marketplace with Akramovic1/claude-hats, then Add plugin (it is listed as hats).
The plugin inside this repository is named hats, because Claude Code keeps plugin names that start with claude- for Anthropic's own.
It runs on macOS and Linux. On Windows it is untested, and adding an account uses a small bash script, so run that step in Git Bash or WSL.
Needs Claude Code 2.1.325 or newer.
Add an account
The account your Claude Code is signed in to is there from the start. For each other subscription:
-
Press + Add on the row, type a name and press Enter. (Or: /accounts-add Work.)
-
The new account's card opens and shows one command. Run it in a terminal, with your browser signed in to claude.ai as that account:
bash "<plugin folder>/bin/save-token" <account id>
It runs claude setup-token for you, picks the new token up by itself (nothing to copy or paste), checks that Anthropic accepts it, and saves it where only you can read it.
-
Back in Claude, the account shows as ready within a few seconds. Press it on the row, then Use this account.
Run it in a normal terminal, not inside a Claude chat (not with !), so the token never ends up in a transcript.
An added account shows no email by default: the token that claude setup-token issues is not allowed to read the account's profile. To show one beside the name, add --email [email protected] to the command. If the automatic pickup fails, the command asks you to paste the token instead; --paste goes straight to that.
Everyday use