claude-swap
A CLI for switching between multiple Claude Code accounts without logging out, with auto-switching before a rate limit and a usage dashboard
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Stores authentication tokens for several Claude Code accounts on the local machine
- Auto-switching changes the active account without a confirmation each time
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/claude-swapDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Install the tool
pipx install claude-swapWithout pipx, pip install claude-swap works too.
Install: uv tool install claude-swap (or pipx install claude-swap). Log into Claude Code with the first account and run cswap add, then repeat for the other accounts. Switch with cswap switch.
Other ways from the author
uv tool install claude-swapRecommended install method.
This is third-party code. Review the repository files before installing.
What it does
claude-swap keeps several authenticated Claude Code accounts and switches the active one without logging out, and in most cases without restarting Claude Code. The cswap list command shows a live dashboard of each account's remaining 5-hour and 7-day quota and reset time. The cswap auto command runs a background loop that watches the current account's usage and switches to the account with the most quota left before the current one hits its limit, with a configurable threshold and protection against flip-flopping. It works with both the Claude Code CLI and the VS Code extension.
Who it is for. For developers with several Claude Code accounts who want to spread usage across them without manually re-logging in every time a limit is hit.
Good fit when
- You have several Claude Code accounts to switch between without logging out
- You need a dashboard showing the remaining quota per account in real time
- Work should not be interrupted by a rate limit: auto-switching should kick in ahead of time
Not a fit when
- Only one Claude Code account is used
- Storing authentication tokens for several accounts on one machine is not acceptable
- Support is needed for agents other than Claude Code and its VS Code extension
Example request
Show the list of Claude Code accounts with remaining quota and turn on auto-switching with an 80 percent thresholdLimitations
Works only with the Claude Code CLI and its VS Code extension, not other agents. After switching, the account applies automatically on Linux and Windows, while on macOS you may need to restart Claude Code or reopen the extension tab until the Keychain cache expires. The instructions explicitly warn against running /logout before adding a new account, since the current Claude Code session can revoke the departing account's refresh token.
How to disable. Stop the cswap auto background process if it is running, and remove the package: uv tool uninstall claude-swap or pipx uninstall claude-swap.
Security check
- Stores authentication tokens for several Claude Code accounts on the local machine
- Auto-switching changes the active account without a confirmation each time
README in short
The README describes claude-swap as a switcher for multiple Claude Code accounts without logging out, with usage tracked in a live cswap list dashboard and auto-switching via cswap auto based on 5-hour and weekly limit usage thresholds. Installation is via uv tool install or pipx install, with updates through cswap upgrade. It covers auto-switch strategies: best picks the account with the most quota left, consume-first burns the soonest-resetting account first. It works with the Claude Code CLI and VS Code extension on macOS, Linux and Windows. MIT licensed.
FAQ
Does Claude Code need to be restarted after switching?
Usually not; on Linux and Windows the new account is picked up automatically. On macOS a restart may be needed until the Keychain cache expires.
Can an account be chosen by alias or email?
Yes, cswap switch accepts a number, an alias set with cswap alias, or the account's email.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything