Skip to main content

claude-swap — Switch Between Multiple Claude Code Accounts

Install

uv tool install claude-swap

Or pipx install claude-swap. Then cswap add once per account.

claude-swap is an open-source CLI that switches Claude Code between multiple Anthropic accounts in under a second by swapping stored OAuth credential profiles — no browser re-login.

Python 3.12+
Runtime
CLI + VS Code
Works with
OS-native
Credential storage
MIT
License

Quickstart

THREE COMMANDS

Pay the OAuth cost once per account. Every switch after that is a single command.

  1. STEP 01

    Install claude-swap

    Run uv tool install claude-swap (or pipx install claude-swap).

  2. STEP 02

    Register each account

    Log into Claude Code as the first account and run cswap add. Switch the Claude Code login to the second account and run cswap add again.

  3. STEP 03

    Switch accounts

    Run cswap switch to rotate, or cswap switch you@work.com for a specific account. In VS Code or Cursor, close and reopen the Claude Code tab so the extension picks up the new login.

Switch accounts in VS Code or Cursor

There is no account picker in the editor. Run cswap switch from any terminal, then close and reopen the Claude Code tab. The extension and the CLI share one credential store, so a switch made anywhere on the machine applies in VS Code, Cursor, and other forks that install the same extension.

Command reference

Every command is a subcommand of cswap. Early flag spellings (cswap --switch) still work; this table uses the current form.

CommandWhat it doesTypical use
cswap addRegister the currently logged-in account (re-run to refresh an expired token)Setup
cswap switchRotate to the next account in sequenceDaily
cswap switch N|email|aliasActivate a specific account by slot, email, or aliasDaily
cswap autoWatch usage and switch before a rate limit landsBackground
cswap run NLaunch Claude Code as that account in this terminal onlyParallel work
cswap listDashboard of every account with 5-hour and 7-day usageDaily
cswap statusShow which account is active right nowDaily
cswap tuiFull-screen interactive dashboard (also: bare cswap)Monitoring
cswap export / import PATHBack up or migrate accounts as a .cswap fileNew machine
cswap remove N|emailUnregister an accountCleanup

Frequently asked questions

This is an independent guide. claude-swap is an MIT-licensed community project by realiti4(opens in new tab), not an Anthropic product and not software I maintain. For how it works under the hood, what it still misses, and how it compares to ccswitch and the other switchers, read the full claude-swap teardown.