Switch between several Claude Code OAuth accounts from the terminal or from inside a Claude Code session.
Account snapshots live in ~/.ClaudeCodeMultiAccounts.json; switching writes only the active account back into Claude's live files.
Works on Windows (PowerShell / CMD / Git Bash), WSL, macOS, and Linux. Requires Node.js 18+ and a Claude Code that has logged in at least once.
npx claude-code-multi-accounts installThis installs two commands, ccs and ccso, adds an auth_success hook that captures each new login automatically, and adds a short SessionStart reminder. Backups of ~/.claude/settings.json go to ~/.claude/backups/multi-account-switch-installer.
If a shell says command not found right after install, open a new terminal.
ccs # list stored accounts with usage
ccs 1 # switch to account [1]
ccs --rename 1 Personal # label an account (omit the name to clear it)
ccs --remove 1 # forget a stored account
ccso # sync the current live login into the storeInside Claude Code, prefix with !:
!ccs
!ccs 1
!ccso
Log into each account once in Claude Code (/login); the hook stores it. From then on switch with ccs <index>.
Deprecated: the long-form commands
cc-switchandcc-sync-oauthare still installed as aliases ofccsandccso, but they will be removed in a future release. Switch to the short names.
Example:
$ ccs
--- Usage ---
5h remaining/reset: 78.0% / 2026. 4. 22. 2:00 PM
7d remaining/reset: 94.0% / 2026. 4. 24. 9:00 AM
Available Claude accounts:
* [0] Alex Example | Pro | 5H:78%(~2h 44min) | 7D:94%(1D 21h) | used:3m ago
[1] Taylor Example | Team Std | 5H:71%(now) | 7D:81%(1D 21h) | used:19h ago
[2] Jordan Example | Team Prem | 5H:0%(now) | 7D:65%(2D 5h) | used:1d ago
Run ccs <index> to make one of these stored entries the active Claude account.
Run ccs --remove <index> to remove a stored account.
Columns: 5H / 7D are the remaining 5-hour and 7-day quota with a reset estimate (cached for non-active accounts); used is when the account was last active. The plan label is a best-effort guess.
- Switching while Claude Code is running is refused; the switch is staged and applied automatically once every Claude Code window closes.
ccs canceldiscards it. - Every write to a live file or the store is backed up first.
- This is a local workaround, not an official Claude feature. It edits
~/.claude.jsonand~/.claude/.credentials.json.
npx claude-code-multi-accounts uninstall