Skip to content

Ccswap

Multi-account and usage manager for Claude Code and OpenAI Codex - switch logins, track quota, auto-rotate before rate limits

Install: /plugin install ccswap --marketplace errhythm/ccswap

Works with Claude Code, Codex · 30 GitHub stars

Install

$/plugin install ccswap --marketplace errhythm/ccswap

Install command taken from the project's README or registry entry. Always review code before running it.

ccswap (Claude Codex Swap)

Multi-account and usage manager for Claude Code and OpenAI Codex. Save multiple logins, check their quota windows, switch manually or automatically before you hit a rate limit, and manage both providers from one dashboard.

What it does

  • Stores several Claude Code logins and several Codex CLI logins side by side, and switches the active one with ccswap switch 2 or ccswap codex switch 2.
  • Reads each account's quota windows: Claude's 5-hour and 7-day usage, Codex's weekly window and credit balance, and every reset time, all in ccswap list.
  • ccswap auto polls every 60 seconds and moves to the account with the most quota left once the active one crosses the threshold (default 90%), so the switch happens before the rate limit does.
  • ccswap run 2 launches Claude Code as account 2 in the current terminal only, leaving every other terminal on your default login, so two accounts work in parallel.
  • Maps a directory to an account, so a bare ccswap run in that repo starts the right login.
  • Full-screen TUI dashboard (ccswap tui, or ccswap watch for the live monitor) showing both providers with live usage and keyboard-driven switching, on macOS, Linux, and Windows.
  • Optional macOS menu-bar app with 5h / 7d / spend per account and click-to-switch, installable as a launchd agent that starts at login.
  • --json on list, status, and switch, plus ccswap auto --once with outcome exit codes, for cron jobs and scripts.

Quick start

uv tool install ccswap

# Log into Claude Code with your first account, then:
ccswap add
# Log in with the next account, then:
ccswap add

ccswap list       # every account's usage and reset times
ccswap switch 2   # or: ccswap switch --strategy best
ccswap auto       # or let it switch for you before a limit is hit

Codex accounts work the same way: run codex login, then ccswap codex add.

Contents

Installation

Using uv (recommended)

uv tool install ccswap

Using pipx

pipx install ccswap

From source

git clone https://github.com/errhythm/ccswap.git
cd ccswap
uv sync
uv run ccswap help

Updating

ccswap upgrade          # uv/pipx installs on macOS/Linux: auto-detects and upgrades
# or run your installer directly:
uv tool upgrade ccswap
pipx upgrade ccswap

Usage

Add your first account

Log into Claude Code with your first account, then:

ccswap add

Add more accounts

Log in with another account, then:

ccswap add

Switch accounts

Rotate to the next account:

ccswap switch

Or switch to a specific account:

ccswap switch 2
ccswap switch user@example.com
ccswap switch dev                # or by alias, once set with `ccswap alias 2 dev`

Not sure which one? ccswap list is the dashboard — every account's quota usage and reset times at a glance:

ccswap list

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

PluginDev tools+6,803 this week

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…

Explore related