by realiti4
Switch between multiple Claude Code accounts
# Add to your Claude Code skills
git clone https://github.com/realiti4/claude-swapMulti-account switcher for Claude Code. Easily switch between multiple Claude accounts without logging out.
uv tool install claude-swap
pipx install claude-swap
git clone https://github.com/realiti4/claude-swap.git
cd claude-swap
uv sync
uv run cswap --help
Log into Claude Code with your first account, then:
cswap --add-account
Log in with another account, then:
cswap --add-account
Rotate to the next account:
cswap --switch
Or switch to a specific account:
cswap --switch-to 2
cswap --switch-to user@example.com
Note: Restart Claude Code after switching for the new account to take effect.
If an account's token expires, log back into Claude Code with that account and re-run:
cswap --add-account
This will update the stored credentials without creating a duplicate.
cswap --list # Show all accounts with 5h/7d usage and reset times
cswap --status # Show current account
cswap --remove-account 2 # Remove an account
cswap --purge # Remove all claude-swap data
No comments yet. Be the first to share your thoughts!
cswap --switch, then reopen and select your previous session. Note that the first message on the new account may use extra usage as the conversation cache rebuilds for that account.| Platform | Credentials | Config backups |
|----------|-------------|----------------|
| Windows | Windows Credential Manager | ~/.claude-swap-backup/ |
| macOS | macOS Keychain | ~/.claude-swap-backup/ |
| Linux | File-based (~/.claude-swap-backup/credentials/) | ~/.claude-swap-backup/ |
Remove all data:
cswap --purge
Then uninstall the tool:
uv tool uninstall claude-swap
# or
pipx uninstall claude-swap
MIT