claude-swap (cswap) stores multiple Claude Code logins, switches between them from the terminal, and can auto-rotate before rate limits with a live usage dashboard.
Overview
claude-swap is a command-line multi-account switcher for Claude Code on the CLI and VS Code extension. It lets you add several Anthropic accounts, rotate to the next login, or target a specific one without repeated manual sign-outs.
Onboarding captures the currently active Claude Code login, then adds others through isolated sign-in links so credentials stay separated. cswap list and cswap watch show plan details, five-hour and seven-day usage, and reset timing; strategies such as best or next-available pick targets by remaining quota.
Automatic switching can watch usage thresholds and move to another account before windows cap, including while Claude Code is running. Per-platform notes cover Linux and Windows picking up switches immediately and macOS Keychain cache behavior.
Additional commands cover importing credential exports, replacing stale tokens, and configuring autoswitch strategy thresholds.
Key features
- Multiple stored Claude Code accounts
- Manual and strategic account switching
- Live usage dashboard in the terminal
- Automatic rotation before rate limits
- VS Code extension compatibility
- Per-account autoswitch overrides
- Credential import and replacement
- Configurable autoswitch strategies
Use cases
- Rotating Claude Code accounts at quota limits
- Comparing usage across personal and work logins
- Running parallel sessions on separate accounts
- Recovering from expired refresh tokens