ccacct
v0.1.0
Published
Switch Claude Code (subscription) accounts on macOS via Keychain without losing context (auto claude --continue).
Readme
ccacct
Switch Claude Code (Claude.ai subscription) accounts on macOS using Keychain, then resume your last context via claude --continue.
This tool is macOS-only for now because it relies on Keychain.
Why this exists
Claude Code supports /login to switch accounts. This CLI adds:
- profiles (save multiple Claude.ai subscription logins)
- fast switching via Keychain
- one command to switch + resume context (
ccacct switch <profile>)
Install (from source)
npm i
npm run build
npm linkInstall (after publishing)
npm i -g ccacctFirst-time setup: save your profiles
For each account you want to save:
- Open Claude Code:
claude- In Claude Code, run:
/loginand sign in to the desired Claude.ai account.
- Exit Claude Code, then save the current credential as a named profile:
ccacct save acc1Repeat for your other accounts:
ccacct save acc2
ccacct save acc3Switch account and keep context
From inside your project directory:
ccacct switch acc2That will:
- switch the Keychain credential to
acc2 - run
claude --continueto resume your most recent session in this directory
Passing args through to claude
Use -- to pass arguments to claude:
ccacct switch acc2 -- --resumeCommands
ccacct save <profile>— save the currently logged-in Claude Code credential into a profileccacct use <profile>— switch to a profile (does NOT launch Claude)ccacct switch <profile> -- [args]— switch then runclaude --continueccacct list— list profiles (local index only; credentials are in Keychain)ccacct doctor— quick environment checks
Security
- Credentials are stored in macOS Keychain.
- Profile index is stored at
~/.config/ccacct/profiles.json(names only).
Troubleshooting
- If
savesays it can't read a credential: openclaude, run/login, then try again. - If
switchworks but Claude still appears on the old account: in Claude Code run/statusto confirm; some versions may store credentials under a slightly different Keychain service name. Open an issue with yourccacct doctoroutput.
License
MIT
