One verb to migrate seamlessly between AI coding tools and models — no re-setup.
switch claude drops you into Claude Code (Opus, subscription + connectors);
switch flash runs aider on Gemini 3.5 Flash; switch opus runs aider on Opus for
the money-path. It remembers your last pick, so a bare switch re-launches it.
switch claude # Claude Code — Opus, subscription + org connectors → start
switch aider # aider, cost-routed ladder → agent
switch cursor # Cursor editor (if installed)
switch flash # aider · Gemini 3.5 Flash (alias: gemini) → fcode
switch pro # aider · Gemini 3.1 Pro → mcode
switch opus # aider · Opus (API, money-path) → ocode
switch # re-launch your last target
npx @incultnitollc/agent-switch # idempotent; safe to re-run
# then:
# 1) paste real keys into ~/.config/agent-keys.env
# 2) source ~/.zshrcThe installer: copies the shell lib to ~/.config/agent-switch.zsh, seeds
~/.config/agent-keys.env (chmod 600, placeholders — never clobbers real keys),
source-guards it into your ~/.zshrc (skips if you already define these functions
inline), and reports any missing prerequisites.
| Command | Launches | Tool | Model | Billing |
|---|---|---|---|---|
start |
Claude Code, cwd-anchored to your repos root, same memory/CLAUDE.md/MCP/plugins | Claude Code | Opus | subscription + connectors |
agent [-f|-a|-o] <repo> [task] |
aider via a cost-router (Flash routine, Opus on money/auth/schema) | aider | Gemini / Opus | API |
switch <target> |
the right tool+model for target, remembers it |
any of the above | — | — |
fcode / mcode / ocode |
aider on Fast / Mid / Smart pin directly | aider | Gemini / Opus | API |
Models are pinned in one file, ~/.config/agent-keys.env — edit these, nothing else:
export FAST_MODEL="gemini/gemini-3.5-flash" # switch flash
export MID_MODEL="gemini/gemini-3.1-pro-preview" # switch pro
export SMART_MODEL="anthropic/claude-opus-4-8" # switch opusPoint start / agent at a different repos root:
export AGENT_REPOS_ROOT="/path/to/your/repos" # default: ~/incultnito/Dev/Backend/repos- aider (
uv tool install aider-chat) — foragent,fcode/mcode/ocode,switch flash/pro/opus. - Claude Code (
npm i -g @anthropic-ai/claude-code) — forstart,switch claude. - Cursor (optional) — for
switch cursor. - A
CONVENTIONS.mdin each repo (aider--reads it). Seed one withnewrepo-aider ..
Remove the # >>> agent-switch >>> block from ~/.zshrc and delete
~/.config/agent-switch.zsh. Your keys in agent-keys.env are left untouched.
switch claudeuses aclaude()wrapper that unsetsANTHROPIC_API_KEYin a subshell, so Claude Code uses your subscription login + org connectors instead of metered API. Remove the wrapper if you prefer metered API billing.- New terminal tab +
switch claudeagain = a parallel agent with the same memory.