Quickstart
From install to switching accounts in five minutes.
1. Install
Section titled “1. Install”# Homebrew (macOS and Linux)brew tap burakdede/tapbrew install aisw
# Shell installer (Linux/macOS)curl -fsSL https://raw.githubusercontent.com/burakdede/aisw/main/install.sh | sh
# Cargocargo install aiswVerify:
aisw --version2. Bootstrap
Section titled “2. Bootstrap”aisw initThis 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.
3. Add profiles
Section titled “3. Add profiles”API key:
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):
aisw add codex ci --from-envInteractive OAuth (opens your browser):
aisw add claude personalaisw add codex personalaisw add gemini personalCapture the currently logged-in account (no re-login):
aisw add claude work --from-liveUseful flags:
| Flag | Effect |
|---|---|
--label "..." | Human-readable description shown in list and status |
--set-active | Activates the profile immediately after adding |
4. Switch accounts
Section titled “4. Switch accounts”Switch a single tool:
aisw use claude workaisw use codex personalaisw use gemini workSwitch all tools to the same profile name in one command:
aisw use --all --profile workWhen the names stop lining up across tools, save a context instead of forcing fake symmetry:
aisw context create acme \ --claude acme-claude \ --codex acme-codex \ --gemini acme-gemini
aisw context use acmeRule of thumb:
aisw use --all --profile workis for the simple case where every tool uses the same profile name.aisw context use acmeis for the real case where each tool may need a different account.
State mode (Claude Code and Codex CLI only):
# 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 sharedThe 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.
5. Inspect state
Section titled “5. Inspect state”# Human-readable summary per tool: installed, active profile, backend, live-match statusaisw statusaisw status --context
# Machine-readable (for scripts)aisw status --jsonaisw status --context --json
# List all stored profilesaisw listaisw list claudeaisw list --json
# List saved contextsaisw context listaisw context list --json6. Maintain profiles
Section titled “6. Maintain profiles”# Renameaisw rename claude default work
# Remove a profile (a backup is created automatically)aisw remove codex old --yes
# List backupsaisw backup list
# Restore a backup, then re-activateaisw backup restore 20260325T114502Z-claude-work --yesaisw use claude work7. Shell hook (optional but recommended)
Section titled “7. Shell hook (optional but recommended)”The shell hook lets aisw use and aisw context use apply environment variable exports to the current shell session in addition to writing live config files. It also enforces workspace guardrails before each claude, codex, or gemini launch.
# Zshecho 'eval "$(aisw shell-hook zsh)"' >> ~/.zshrcsource ~/.zshrc
# Bashecho 'eval "$(aisw shell-hook bash)"' >> ~/.bashrcsource ~/.bashrc
# Fishecho 'aisw shell-hook fish | source' >> ~/.config/fish/config.fish
# PowerShellAdd-Content $PROFILE "`naisw shell-hook pwsh | Out-String | Invoke-Expression". $PROFILE8. Workspace guardrails (optional, for multi-repo or multi-client work)
Section titled “8. Workspace guardrails (optional, for multi-repo or multi-client work)”If you work on repos that each require a different account, bind them to the right context so you get a warning when the wrong account is active before launching an agent:
# Bind a repo to the context it should usecd ~/clients/acme-apiaisw workspace bind . --context client-acme
# Set a fallback for everything elseaisw workspace bind --default --context personal
# Warn on mismatch (default) or block entirelyaisw workspace guard --mode warnaisw workspace guard --mode strict
# Check what the current directory resolves toaisw workspace statusSee Workspace guardrails for the full setup guide.
Next steps
Section titled “Next steps”- Commands - full syntax for every command
- Workspace guardrails - protect repos from wrong-account launches
- Automation and scripting - CI and non-interactive patterns
- How it works - credential storage, platform details, design decisions