Skip to content

Quickstart

From install to switching accounts in five minutes.

Terminal window
# Homebrew (macOS and Linux)
brew tap burakdede/tap
brew install aisw
# Shell installer (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/burakdede/aisw/main/install.sh | sh
# Cargo
cargo install aisw

Verify:

Terminal window
aisw --version
Terminal window
aisw init

This creates ~/.aisw/, offers to install the optional shell hook (recommended), and detects any accounts you are already logged into. If you are already signed into Claude Code, Codex, or Gemini, init will offer to import those credentials as named profiles so you start without re-authenticating.

API key:

Terminal window
aisw add claude work --api-key "$ANTHROPIC_API_KEY"
aisw add codex work --api-key "$OPENAI_API_KEY"
aisw add gemini work --api-key "$GEMINI_API_KEY"

From the current environment variable (useful in CI or when the key is already exported):

Terminal window
aisw add codex ci --from-env

Interactive OAuth (opens your browser):

Terminal window
aisw add claude personal
aisw add codex personal
aisw add gemini personal

Capture the currently logged-in account (no re-login):

Terminal window
aisw add claude work --from-live

Useful flags:

FlagEffect
--label "..."Human-readable description shown in list and status
--set-activeActivates the profile immediately after adding

Switch a single tool:

Terminal window
aisw use claude work
aisw use codex personal
aisw use gemini work

Switch all tools to the same profile name in one command:

Terminal window
aisw use --all --profile work

State mode (Claude Code and Codex CLI only):

Terminal window
# Isolated: tool reads from a profile-specific config dir (no shared history)
aisw use claude work --state-mode isolated
# Shared: tool reads from its standard config dir (shared history, settings)
aisw use claude work --state-mode shared

The default is isolated. Use shared when you want the tool to behave as if it was never redirected - useful for quick one-off usage or when you rely on existing settings or CLAUDE.md files.

Terminal window
# Human-readable summary per tool: installed, active profile, backend, live-match status
aisw status
# Machine-readable (for scripts)
aisw status --json
# List all stored profiles
aisw list
aisw list claude
aisw list --json
Terminal window
# Rename
aisw rename claude default work
# Remove a profile (a backup is created automatically)
aisw remove codex old --yes
# List backups
aisw backup list
# Restore a backup, then re-activate
aisw backup restore 20260325T114502Z-claude-work --yes
aisw use claude work

The shell hook lets aisw use apply environment variable exports to the current shell session in addition to writing live config files.

Terminal window
# Zsh
echo 'eval "$(aisw shell-hook zsh)"' >> ~/.zshrc
source ~/.zshrc
# Bash
echo 'eval "$(aisw shell-hook bash)"' >> ~/.bashrc
source ~/.bashrc
# Fish
echo 'aisw shell-hook fish | source' >> ~/.config/fish/config.fish