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.
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>)
npm i
npm run build
npm linknpm i -g ccacctFor each account you want to save:
- Open Claude Code:
claude- In Claude Code, run:
/login
and 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 acc3From 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
Use -- to pass arguments to claude:
ccacct switch acc2 -- --resumeccacct 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
- Credentials are stored in macOS Keychain.
- Profile index is stored at
~/.config/ccacct/profiles.json(names only).
- 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.
MIT