---
author: "Umesh Malik"
canonical: "https://umesh-malik.com/tools/claude-swap"
description: "Install claude-swap (cswap) in one command and switch Claude Code accounts in seconds. Works with the CLI, VS Code, and Cursor. Independent guide to realiti4’s MIT-licensed CLI."
title: "claude-swap — Switch Claude Code Accounts Without Re-Login"
tokens: 759
generator: "scripts/generate-page-markdown.mjs"
---

CLI · MIT · realiti4

# 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.

[GitHub(opens in new tab)](https://github.com/realiti4/claude-swap) [Full teardown](https://umesh-malik.com/blog/claude-swap-multi-account-switcher-guide)

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.

Command

What it does

Typical use

cswap add

Register the currently logged-in account (re-run to refresh an expired token)

Setup

cswap switch

Rotate to the next account in sequence

Daily

cswap switch N|email|alias

Activate a specific account by slot, email, or alias

Daily

cswap auto

Watch usage and switch before a rate limit lands

Background

cswap run N

Launch Claude Code as that account in this terminal only

Parallel work

cswap list

Dashboard of every account with 5-hour and 7-day usage

Daily

cswap status

Show which account is active right now

Daily

cswap tui

Full-screen interactive dashboard (also: bare cswap)

Monitoring

cswap export / import PATH

Back up or migrate accounts as a .cswap file

New machine

cswap remove N|email

Unregister an account

Cleanup

## Frequently asked questions

This is an independent guide. claude-swap is an MIT-licensed community project by [realiti4(opens in new tab)](https://github.com/realiti4), 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](https://umesh-malik.com/blog/claude-swap-multi-account-switcher-guide).
