Skip to main content

llmswap

One account switcher for every coding-agent CLI. Save several logins for Claude Code, Codex and Gemini CLI, switch without logging out, see every account's 5-hour and weekly usage in one dashboard, rotate before a limit hits, and start each account's 5-hour window early with scheduled warm-up pings.

The llmswap dashboard: Claude Code, Codex and Gemini CLI accounts with usage bars and reset countdowns

llmswap is a fork of claude-swap by Onur Cetinkol (MIT). Everything claude-swap does for Claude Code is kept; Codex, Gemini CLI, the unified dashboard and warm-up are new. See credits.

Install

uv tool install llmswap-cli          # or: pipx install llmswap-cli

The command is llmswap. (The name llmswap on PyPI belongs to an unrelated project, so the package is llmswap-cli.) Python 3.12+.

llmswap ships claude-swap's claude_swap package inside it. Install it in its own tool environment (uv tool or pipx, as above) and do not put it in the same Python environment as the standalone claude-swap package: both provide claude_swap.

Quick start

llmswap add                  # save the login every installed CLI is signed in with now
llmswap codex login          # sign in to a second Codex account without touching the first
llmswap list -r              # every account, every window, read live
llmswap switch codex:2       # make Codex account 2 the default login
llmswap run codex:1 -- exec "fix the tests"   # run as account 1 in this terminal only
llmswap                      # the dashboard

llmswap list on a terminal draws a bar per window:

llmswap list: bars for the 5-hour and 7-day windows of each account

What it does

Claude Code Codex Gemini CLI
Save and switch logins without logging out yes yes run only ¹
Live 5-hour and weekly usage yes yes not reported ²
Rotate before a limit (llmswap auto) yes yes –
Parallel sessions (llmswap run) yes yes yes
Warm-up pings yes yes – ³

¹ Gemini CLI keeps its one default login in the system keychain, which llmswap does not touch. Each Gemini account lives in its own private home and runs with llmswap run gemini:<n>. ² Gemini reports quota per model per day inside the CLI. llmswap does not read it yet. ³ Gemini has no 5-hour window to start.

Per-provider commands (llmswap <provider> ...): add, login, switch, run, remove, alias, enable/disable (hold an account out of rotation), usage. llmswap claude ... is claude-swap's complete command set, documented in docs/claude-code.md. Provider details and the evidence behind each are in docs/providers.md.

llmswap list --json is a stable contract: fields are added, never renamed or removed (docs/json-output.md).

Rotate before a limit

llmswap auto               # watch every minute, switch when the active account reaches 90%
llmswap auto --once        # one pass, for cron
llmswap codex disable 3   # keep an account out of rotation

Claude Code uses claude-swap's engine with its cooldowns, per-account thresholds and tiers (docs/auto-switch.md). Other providers move to the account with the most headroom once the active one reaches the threshold, skipping disabled and API-key accounts, with a five-minute cooldown. Running Codex sessions need a restart to use the new login.

Warm-up pings

A 5-hour window starts at an account's first request and ends five hours later. If you start work cold, the window you burn through ends mid-day. Warm-up sends the smallest possible request through the official CLI as soon as an account's window has reset (or never started), so the window is already running when you sit down, and the next one starts as early as possible.

llmswap warm add codex:1 claude:2     # choose accounts (nothing is warmed by default)
llmswap warm quiet 23:00 07:00        # no pings overnight
llmswap warm enable                   # installs the schedule
llmswap warm status                   # what is due and when

It is opt-in and off by default, and llmswap warm enable makes you confirm you have read the terms below before it installs anything. enable installs a job in your platform's own scheduler (launchd on macOS, a systemd user timer or cron on Linux, Task Scheduler on Windows) that runs llmswap warm tick every five minutes. Most ticks do nothing: a tick pings an account only when its 5-hour window is cold, it is outside quiet hours, and it has not just been pinged. A failing account is retried with growing delay. llmswap warm disable removes the job. Details: docs/warm-up.md.

Read your provider's terms first. Warm-up sends real requests with your own logins through the official CLIs, on a schedule, unattended, and spends a little of your quota.

  • Anthropic's Consumer Terms say you may not, "except when you are accessing our Services via an Anthropic API Key or where we otherwise explicitly permit it, … access the Services through automated or non-human means, whether through a bot, script, or otherwise." A scheduled claude -p on a Pro or Max login can fall under that. Team and Enterprise accounts are on different terms, and Anthropic may permit it explicitly; checking is your job. For that reason warm add --all skips Claude accounts: each one must be named.
  • OpenAI's Terms of Use bar "automatically or programmatically extracting data or Output" and making your account available to anyone else.

Use only accounts you own. Turning warm-up on is your decision and your risk. The same goes for llmswap auto and llmswap run: they use your own logins, and you are responsible for how your plan's terms treat them.

Menu bar (macOS)

uv tool install 'llmswap-cli[menubar]'
llmswap menubar              # runs under launchd, starts at login

Shows the fullest active window in the menu bar, every account's usage in the menu, and switches or pings with a click. llmswap menubar --uninstall removes it.

Compared with the others

What each project's own README says it does (checked 5 Dec 2026). Where another project does something llmswap does not, the table says so.

llmswap claude-swap codex-swap ccswap Codex Switcher PlanSwap cwarm aisw
Claude Code yes yes – yes – yes warm only yes
Codex yes – yes yes yes yes – yes
Gemini CLI run only ¹ – – – – – – switch
Antigravity – – – yes – yes – –
Switch without logging out yes yes yes yes yes yes – yes
Live 5h / weekly usage Claude, Codex yes yes yes yes yes – –
Auto-rotate before a limit yes yes at launch yes – recommends – –
Parallel sessions yes yes – yes – – – –
Folder-to-account mapping Claude only yes – yes – – – –
Terminal dashboard yes yes – yes – – – –
Menu bar macOS macOS – macOS yes (app) – – –
Other front ends – VS Code extension works – Raycast, T3 hub – VS Code – shell hook
Scheduled warm-up yes, native scheduler – manual anchor during auto-switch yes (app) – yes, Claude only –
Form CLI CLI CLI CLI desktop app VS Code CLI CLI

llmswap's differences: one provider interface (a new CLI is one module), warm-up that follows each account's own reset time and runs from the platform scheduler, and a single command over Claude Code, Codex and Gemini CLI. Research notes and what was borrowed from each: docs/feature-map.md.

Status and known limits

  • Claude Code support is the inherited claude-swap engine, unchanged.
  • Codex and the warm-up pings were built from Codex CLI 0.174.0's source and checked with fixtures and a fake codex binary in a temporary home. They have not yet been run against a live Codex or Claude account. In particular, the rule "0% used with a full window away means the window is cold" is documented by other tools but not yet confirmed here on a real account. Report what you see.
  • Gemini CLI: private homes and llmswap run gemini:<n> only. Usage is not read and there is no default-login switch, because Gemini keeps its login in the OS keychain or an encrypted file.
  • Copilot CLI, opencode, Cursor CLI and Grok CLI are left out for now; docs/providers.md says why for each.

Safety

  • Tests and development never touch real logins: they run against temporary homes and fake keychains.
  • A login is written into a saved slot only when its identity matches that slot, and the default login is never overwritten if it is not saved. Rotated refresh tokens are captured back before a switch.
  • llmswap never runs codex logout or any logout: those revoke the refresh token on the provider's side and break every saved copy.
  • Tokens are never printed, logged or put in --json output.

Data locations

llmswap keeps its own data in ~/.llmswap/ (macOS, Windows) or ${XDG_DATA_HOME:-~/.local/share}/llmswap/ (Linux); set LLMSWAP_HOME to move it. Claude Code accounts stay where claude-swap keeps them (docs/claude-code.md).

Credits

License

MIT. Copyright (c) 2026 Richard Lao and Onur Cetinkol. See LICENSE.

Contributing: CONTRIBUTING.md and AGENTS.md.

Metadata

Release files for llmswap-cli 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmswap-cli 1.0.0
File Size Uploaded Provenance Actions
llmswap_cli-1.0.0.tar.gz 1.3 MB With provenance Details for llmswap_cli-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llmswap-cli 1.0.0
File Interpreter ABI Platform Actions
llmswap_cli-1.0.0-py3-none-any.whl Python 3 none any Details for llmswap_cli-1.0.0-py3-none-any.whl

Total release size: 1.9 MB

Release files / llmswap_cli-1.0.0.tar.gz

Download URL llmswap_cli-1.0.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
21ae851fbe2e7bb927b7307c5d39f26ebfcb0fa01792dcaf45ac2307276ff40b
BLAKE2b-256 checksum
How to use checksums
ac850a3441ad336d4196f383d12b6746f405823ac128fe23f74ab061e7dacf60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / llmswap_cli-1.0.0-py3-none-any.whl

Download URL llmswap_cli-1.0.0-py3-none-any.whl
Size 542.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7118a90980acb19346cc11d85676665cde9bf37c5f6fa946f5d3f7eb4c1882a6
BLAKE2b-256 checksum
How to use checksums
dc8214f035fc21c6b473c29cc64217d684fceb891cc6121f0ee585785ce18a60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for llmswap-cli 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llmswap_cli-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page