Multi-account switcher for Claude Code. Easily switch between multiple Claude accounts without logging out.
uv tool install claude-swappipx install claude-swapgit clone https://github.com/realiti4/claude-swap.git
cd claude-swap
uv sync
uv run cswap --helpLog into Claude Code with your first account, then:
cswap --add-accountLog out of Claude Code, log in with another account, then:
cswap --add-accountIf an account's token expires, log back into Claude Code with that account and re-run:
cswap --add-accountThis will update the stored credentials without creating a duplicate.
Rotate to the next account:
cswap --switchOr switch to a specific account:
cswap --switch-to 2
cswap --switch-to user@example.comNote: Restart Claude Code after switching for the new account to take effect.
cswap --list # List all accounts with usage stats
cswap --status # Show current account
cswap --remove-account 2 # Remove an account
cswap --purge # Remove all claude-swap data- Backs up OAuth tokens and config when you add an account
- Swaps credentials when you switch accounts
- Account credentials stored securely using platform-appropriate methods
| 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 --purgeThen uninstall the tool:
uv tool uninstall claude-swap
# or
pipx uninstall claude-swap- Python 3.12+
- Claude Code installed and logged in
MIT