hats
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Run several Claude accounts side by side on macOS: separate Desktop and Claude Code profiles, launchers, and one list of everything running.
hats
Wear every hat at once. Run work, personal and client Claude accounts side
by side on one Mac (Claude Desktop with Cowork, and the claude CLI), and see
every running Claude in one place.
$ hats add personal
Created profile 'personal'.
launcher ~/Applications/Hats/Claude (Personal).app
$ hats ps
PROFILE KIND PID STATUS AGE NAME CWD
default desktop 16717 - 14h - -
default cli 22045 waiting 17h acme-4b ~/dev/acme
personal desktop 81792 - 2m - -
personal cli 83110 busy 1m blog-1c ~/oss/blog
Unofficial community tool. Not affiliated with or endorsed by Anthropic.
Website · CLI reference · What hats reads and writes
Why
Claude Desktop holds one account per install, and the CLI one per config
directory. hats gives each identity its own profile, and leaves your
existing install alone:
Stock install (default) |
hats add personal |
|
|---|---|---|
| Desktop chats, login, connectors, MCP | ~/Library/Application Support/Claude |
…/hats/profiles/personal/desktop |
claude CLI, Desktop's Code tab and Cowork |
~/.claude |
…/hats/profiles/personal/code |
| How you open it | Claude.app | Claude (Personal).app, or hats open personal |
- Never touches Claude.app or your default install. No renaming, symlinking,
re-signing or force-quitting. - Know which account is which.
hats lsshows each profile's sign-in state
and account;hats doctorwarns when two profiles ended up on the same account
andhats resetstarts one fresh. - Click again to focus. A launcher brings its window forward instead of
starting a duplicate, andhats dedupecleans up duplicates from elsewhere. - Dock-ready. Briefcase, person or letter icons in profile colours;
hats dock pin(opt-in) or--desktopcopies. - One view of everything.
hats pslists Desktop instances and Claude Code
sessions across all accounts, with live status (busy, idle, waiting). - Already juggling
CLAUDE_CONFIG_DIR?hats add work --code-dir ~/.claude-work
adopts the existing directory with its login and history intact. - Native and auditable. Swift, one dependency, no telemetry. The one
network request is a daily update check (HATS_NO_UPDATE_CHECK=1turns it
off).
Keychain queries ask for attributes only, never the secret. Of other
processes' environments it keeps onlyCLAUDE_CONFIG_DIR. Claude's account
files are parsed in memory and only the account ID, email, organization and
sign-in state are kept. It never keeps, stores or relays tokens
(everything it reads and writes).
Install
Requires macOS 14+, Claude Desktop, and (for run) Claude Code.
brew install wearhats/tap/hats
Homebrew 6 and later only load third-party taps you trust. Installing by the
full name, as above, trusts just the hats formula. If you brew tap wearhats/tap first, run brew trust --formula wearhats/tap/hats beforebrew install hats.
Without Homebrew, the install script checks the download's SHA-256 (and its
GitHub build provenance when the gh CLI is signed in) and installs to~/.local/bin, without sudo:
curl -fsSL https://wearhats.dev/install.sh | sh
# or read it first:
curl -fsSLO https://wearhats.dev/install.sh && less install.sh && sh install.sh
From source: swift build -c release --product hats && install -m 0755 .build/release/hats ~/.local/bin/.
Manual download: get hats-macos-universal.tar.gz from the Releases page and
check its build provenance withgh attestation verify hats-macos-universal.tar.gz --repo wearhats/hats.
Until releases are notarized, a binary downloaded with a browser is
quarantined; clear that with xattr -d com.apple.quarantine hats.
Then run hats setup. Upgrade with brew upgrade hats or by re-running the
script; hats doctor shows the command for your install. More indocs/releasing.md.
Use
hats setup # guided: adopt existing dirs, add your other account
hats add personal --pin # profile + launcher in ~/Applications/Hats, pinned to the Dock
hats launcher link # also show the launchers in Finder's Applications folder
hats add work --shortcut w # then hats run w works like hats run work
hats open personal # or click the launcher; hats open --all opens every profile
hats run personal # claude CLI on the personal account (then /login once)
hats ps # every running Claude, across accounts
hats focus acme-4b # jump to the terminal or window running a session
hats ls # profiles, sign-in state, accounts (--size for disk use, --paths for dirs instead)
hats reset personal --open # it opened on the wrong account: start it fresh
hats doctor # explain what's set up and what's wrong
Launchers live in the Applications folder inside your home folder
(~/Applications/Hats), and Spotlight finds them as "Claude (Personal)".hats setup can also show them in Finder's Applications folder, through a link
at /Applications/Hats (an admin account is needed for that). Other accounts on
the Mac will see that folder too.
The everyday commands have one-letter shortcuts: hats r (run), hats o
(open), hats x (exec) and hats f (focus).
Per-directory accounts with direnv: echo 'eval "$(hats env personal)"' > ~/oss/.envrc.
Other tools that honour CLAUDE_CONFIG_DIR, such as usage reporters, work per
account through hats exec personal -- <command>.
Full reference: docs/cli.md.
Signing in to a second account
Sign-in links (claude://…) can open in a Claude window that is already
running instead of the new one. If that happens, quit the other Claude windows
(Cmd-Q), sign in to the new profile, then bring the other profiles back withhats open --all (it skips default, so reopen Claude.app yourself). If a profile still ends up on the wrong account,hats reset <name> --open starts it fresh.
Tips
- Give each profile its own theme in Claude's settings (for example, work dark and
personal light). Every instance shares Claude's Dock icon, and this tells the
windows apart at a glance. - Cowork downloads its VM (about 12 GB) separately for each profile that uses it
(hats ls --sizeshows it). - After a Claude update, a profile's window is expected to come back on the
default account (reported by users, being verified).hats doctor
spots the resulting duplicate;hats dedupe && hats open --allfixes it. - Desktop's Chrome extension pairing only works in the default profile.
Uninstall
hats dock unpin && hats rm --all --purge &&
rm -rf ~/Applications/Hats "$HOME/Library/Application Support/hats" &&
brew uninstall hats
If you installed with the script, replace brew uninstall hats withrm ~/.local/bin/hats. hats rm --all --purge removes the launchers, the
launcher copies hats placed (for example on the Desktop), their Dock tiles and
the /Applications/Hats link, and moves profile data to the Trash. The
commands are chained so that a refused or mistyped rm --purge stops there,
and rm -rf never deletes data that didn't reach the Trash. The block has no inline comments, because zsh, the
default macOS shell, doesn't treat # as a comment when you paste into it.
Delete any launcher copies you moved elsewhere by hand. Claude Code's own logins for
profile config dirs stay in your Keychain as Claude Code-credentials-<hash>
items; delete them in Keychain Access if you no longer need them (hats rm --purge prints the exact name). Your default Claude install was never
modified, so there's nothing to restore. brew untap wearhats/tap removes the
tap too.
Scope
hats runs on macOS only and organizes accounts you hold. It won't:
- modify, re-sign or clone Claude.app;
- move chats or sessions between accounts;
- show usage, billing or quota (that needs your account token);
- change or intercept the
claude://sign-in handler; - change your Dock unless you ask;
- orchestrate agents;
- help stretch usage limits across accounts.
The reasons are in the design rules. Ideas and requests are
welcome in Discussions and
issues.
Docs
CLI reference · Design rules ·
What hats reads and writes · Architecture ·
Releasing · Security · Contributing
Tested with Claude Desktop 4.4212.0, Claude Code 2.1.312 and macOS 27.0.1.
Thanks
hats builds on workarounds and reports shared by the community in
anthropics/claude-code#18435.
License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found