realiti4/claude-swap

Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and parallel sessions

claude-swap is a command-line utility for anyone using Anthropic's Claude Code (the coding agent) with more than one account. Instead of logging out and back in to change accounts, it stores each account's OAuth login, swaps the active credential on command, and tracks how much of each account's usage quota you've burned through.

The core idea is simple: Claude Code rate-limits usage in rolling 5-hour and 7-day windows per account. claude-swap stores credentials for several accountshare them from one shell command, or let it watch your usage and automatically switch to a fresh account when the current one reaches ~90% of its limit — before you get blocked mid-task. A dashboard (cswap list) shows every account's usage bars and reset times in real time.

Beyond basic rotation, it can run two accounts in parallel (one session in this terminal, your default login elsewhere), map directories to specific accounts so work repos always use the work account, and expose a macOS menu bar widget or a full-screen TUI for point-and-click switching. Credentials are stored securely (Keychain on macOS, files elsewhere), and switches take the same locks Claude Code itself uses so nothing collides mid-token-refresh.

It's a pragmatic tool for power users of Claude Code: freelancers juggling multiple subscriptions, teams sharing work accounts, or anyone who keeps hitting limits and wants the inconvenience automated away.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project