realiti4/claude-swap
Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and parallel sessions
What it solves
claude-swap is a multi-account manager for Claude Code (CLI and VS Code extension). It solves the problem of hitting rate limits by allowing users to easily switch between multiple Claude accounts without logging out, or by automatically rotating accounts based on remaining quota.
How it works
The tool backs up OAuth tokens and configuration for each added account. It manages these credentials securely using platform-specific methods (like macOS Keychain) and swaps the active login when a user switches accounts.
Key mechanisms include:
- Automatic Switching: A background process monitors usage and switches to the account with the most quota left when a threshold (e.g., 90%) is reached.
- Session Mode: Allows running Claude Code as a specific account in a single terminal session without affecting other terminals or the VS Code extension.
- Directory Mapping: Binds specific directories to specific accounts, so
cswap runautomatically picks the correct account based on the repo. - Usage Tracking: Polls Anthropic's usage API to provide a live dashboard of 5-hour and 7-day quotas.
Who it’s for
Developers using Claude Code who manage multiple accounts to avoid rate limits or separate work and personal environments.
Highlights
- Live Dashboard: A TUI (Terminal User Interface) and an optional macOS menu bar app for tracking usage and switching accounts.
- Smart Rotation Strategies: Includes strategies like
best(most quota left) andconsume-first(prioritizes accounts resetting soonest). - Parallel Execution: Run multiple accounts simultaneously in different terminal sessions.
- Safe Integration: Uses the same credential locks as Claude Code to prevent collisions during token refreshes.
- Scripting Support: Provides JSON output for
list,status, andswitchcommands for automation.
Related
- Project
- Project
- Project
- Project
- Project