AI Switcher documentation
Named profile and context manager for Claude Code, Codex CLI, and Gemini CLI. Store per-tool accounts, save mixed-name work modes, and switch between them in one command across all three AI coding agents - on macOS, Linux, and Windows.
If you maintain separate work and personal accounts for Claude Code, Codex, or Gemini - or manage credentials for multiple clients - aisw gives you one command to switch instead of manually editing ~/.claude/.credentials.json, juggling CLAUDE_CONFIG_DIR overrides, or copying auth.json files between directories. For Codex ChatGPT-managed auth, the durable model is one isolated CODEX_HOME per profile, not copied shared session state.
It is built for the questions people actually ask:
- How do I switch between two Claude Code accounts?
- How do I keep separate Codex CLI accounts for different clients?
- How do I store work and personal Gemini CLI profiles on one machine?
- How do I make sure the right coding agent account is active in the right repo?
aisw answers those with three primitives:
- Profiles: named saved accounts for one tool
- Contexts: one saved work mode across multiple tools
- Workspace guardrails: repo-aware warnings or blocks before launching the wrong account
Install
Section titled “Install”brew tap burakdede/tap && brew install aiswOther installers:
# Shell installer (Linux/macOS)curl -fsSL https://raw.githubusercontent.com/burakdede/aisw/main/install.sh | sh
# Cargocargo install aiswFirst run
Section titled “First run”aisw initinit creates ~/.aisw/, configures the optional shell hook, and offers to import any currently logged-in tool accounts so you start with zero manual re-authentication.
Core workflow
Section titled “Core workflow”# Store profilesaisw add claude work --api-key "$ANTHROPIC_API_KEY"aisw add claude personal # launches interactive OAuthaisw add codex work --api-key "$OPENAI_API_KEY"aisw add gemini work --api-key "$GEMINI_API_KEY"
# Activate a profileaisw use claude workaisw use --all --profile personal # switch all tools at once
# Save and activate a mixed-name contextaisw context create acme --claude acme-claude --codex acme-codex --gemini acme-geminiaisw context use acme
# Inspect stateaisw statusaisw status --contextaisw listCommon situations
Section titled “Common situations”Work and personal accounts for the same tool
Section titled “Work and personal accounts for the same tool”Store both once, then switch by name:
aisw add claude work --api-key "$ANTHROPIC_API_KEY"aisw add claude personalaisw use claude workMixed client setup across Claude, Codex, and Gemini
Section titled “Mixed client setup across Claude, Codex, and Gemini”Use a context when each tool needs a different profile name:
aisw context create client-acme \ --claude acme-claude \ --codex client-a-openai \ --gemini gemini-consulting
aisw context use client-acmeWrong-account protection per repo
Section titled “Wrong-account protection per repo”Use workspace guardrails when the repo itself should enforce the right work mode:
aisw workspace bind . --context client-acmeaisw workspace guard --mode strictStart here
Section titled “Start here”- Quickstart - install, first profile, first switch
- Common switching situations - work/personal, client, repo guardrails
- Commands - complete syntax and flag reference
- How it works - design decisions, credential storage, platform behavior
- Security - local-only storage, keyring integration, file permissions
- Automation and scripting - CI patterns, JSON output, non-interactive mode
- Troubleshooting - common failures and diagnostics