claude-swap lets you hot-swap Claude Code accounts without re-logging in
`claude-swap` is an open-source CLI tool that backs up and restores OAuth credentials for multiple Claude Code accounts, letting users switch between them with a single `cswap --switch` command instead of going through a full browser OAuth flow each time.
Score breakdown
The tool reduces a disruptive 60-second browser OAuth round-trip — required every time a Claude Code usage limit is hit — to a single command, preserving the focused agentic coding loop the tool is built around.
- 01claude-swap (CLI: `cswap`) is an open-source, MIT-licensed Python package — not an Anthropic product.
- 02It backs up and restores OAuth tokens plus the `oauthAccount` block in `~/.claude/.claude.json` for each registered account.
- 03Switching accounts uses a single `cswap --switch` command instead of a full browser OAuth re-authentication.
Umesh Malik's article describes `claude-swap`, a community-built CLI tool (not an Anthropic product) that solves a common friction point for heavy Claude Code users: switching between multiple accounts when usage limits are hit. The native workaround — running `/logout`, completing a browser OAuth redirect, and re-establishing working context — can happen multiple times a day and disrupts the focused, agentic coding loop Claude Code is designed to support. `claude-swap` removes that cost by storing each account's OAuth credentials in its own vault and swapping them into Claude Code's live credential store on demand, reducing a 60-second browser ritual to a single `cswap --switch` command.
The tool installs as a Python package and works with both the Claude Code CLI and the official VS Code extension, since both read from the same on-disk credential store.
The tool installs as a Python package and works with both the Claude Code CLI and the official VS Code extension, since both read from the same on-disk credential store. Platform support follows OS-native conventions: macOS uses the system Keychain under the service name `Claude Code-credentials`, Linux and WSL use a plaintext file at `~/.claude/.credentials.json`, and Windows uses the Credential Manager alongside the `oauthAccount` block in `~/.claude/.claude.json`. Vault backups are stored at `~/.local/share/claude-swap/` on Linux and `~/.claude-swap-backup/` elsewhere. The article notes the tool had 27+ releases by mid-2026 and is MIT-licensed. Importantly, `claude-swap` is a credential switcher, not a live session multiplexer — users must restart Claude Code after each switch, and the article advises treating account-juggling as a personal-productivity tool while staying aware of plan terms.
Key facts
- 01claude-swap (CLI: `cswap`) is an open-source, MIT-licensed Python package — not an Anthropic product.
- 02It backs up and restores OAuth tokens plus the `oauthAccount` block in `~/.claude/.claude.json` for each registered account.
- 03Switching accounts uses a single `cswap --switch` command instead of a full browser OAuth re-authentication.
- 04On macOS it uses the system Keychain (`Claude Code-credentials`); on Linux/WSL a plaintext file at `~/.claude/.credentials.json`; on Windows the Credential Manager.
- 05Vault backups are stored at `~/.local/share/claude-swap/` on Linux and `~/.claude-swap-backup/` elsewhere.
- 06It is a credential swap, not a live session multiplexer — Claude Code or the VS Code extension tab must be restarted after switching.
- 07The tool had 27+ releases by mid-2026.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 13, 2026 · 08:58 UTC. How this works →