Save and switch account logins for AI coding CLIs (Antigravity, Claude Code, OpenCode, Codex).
pip install agentswitcher Copy PIP instructions
Save the login of every account you use with a coding agent, then switch between them with one command. Built for developers who share a machine between a work account and a personal one — for Antigravity (agy), Claude Code, OpenCode and Codex — without logging out and back in, and without touching a browser cookie, a proxy or anyone's traffic.
av (or asw) stores each login encrypted on your machine under a name you choose. One account is active at a time; switching is a single command with a verification step and a rollback.
Status: 0.1.1. Install with pip install agentswitcher (or pipx install agentswitcher). Everything below is true of this tree.
Proven: real av save/av use on a signed-in Antigravity login (Windows Credential Manager) and a signed-in Codex login, with the store byte-identical afterwards; 1428 tests; a clean-venv install of both artifacts; CI green on Windows and Linux, Python 3.11 and 3.13. Not proven yet: a switch between two different accounts (this machine had one account per agent; av logout now makes that cycle possible without /logout).
Requires Python 3.11 or newer (developed and tested on 3.14.2) — see Prerequisites.
# 1. install (from PyPI; from a checkout use `python -m pip install .`) python -m pip install agentswitcher # 2. see what is on this machine av detect # which agents are installed, where each login lives, whether it can be switched av doctor # the full health check; exit code 1 means something needs fixing # 3. sign in to an agent as usual, then save that login under a name av save claude work # 4. sign out and in as the other account, save it too, then switch freely av save claude personal av use claude work av list # which profile is active, and when it was captured asw is an alias for av. Add the full-screen app with pip install 'agentswitcher[tui]', then run av tui (? shows every key).
Nothing leaves the machine: no network calls, no telemetry, no account names — the vault key lives in the OS credential store and the profiles are AES-256-GCM files under your data directory.
macOS is not supported in this release - declared as a non-goal rather than an untested claim.
Every read-only command accepts --json (schema 1, additive-only — see super-docs/API.md). Exit codes: 0 ok · 1 error · 2 usage or a bad option · 3 refused because the agent is running, another av holds the lock, or the login signed in now is a different account from the active profile (AV023) · 130 interrupted.
Google's Antigravity FAQ answers "Can I use Antigravity CLI headless mode in third-party coding agents or automate account switching?" with: "Wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans." Its Terms of Service also call third-party access a breach that "may be grounds for suspension or termination" of your Antigravity and/or Gemini CLI account — see https://antigravity.google/terms and https://antigravity.google/docs/faq.
av does it anyway, because you asked for it and the accounts are yours. That is the entire warning: one command changes which account agy uses, and Google has said it does not support that. Codex, Claude Code and OpenCode carry no such wording — OpenAI in fact documents saved-account switching.
av never rotates accounts for capacity, never pools quota, and never runs in the background. One account is active at a time, always because you typed a command.
av never reads a .env file. Precedence, highest first: a flag (--data-dir, --config-dir, --color) → an AV_* variable → config.toml in the config directory → the platform default. Every variable is also listed with no values in .env.example.
There are no secrets in the environment on purpose: the vault key is created in the OS credential store on first use and never printed.
Python is pinned in .python-version (3.14.2 for development; the package supports 3.11+). The test suite includes artifact smoke tests that build the wheel and sdist and install them into fresh virtual environments (tests/smoke), so verify is slower than a plain unit run and needs uv and network access for the first install.
MIT — see LICENSE. The decision and the alternatives considered are in super-docs/DECISIONS.md.
All 2 files in this release have provenance metadata.
accounts antigravity claude-code cli codex opencode profiles
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
All 2 files in this release have been uploaded with provenance metadata.
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.




