AgentRoute
Route Claude Code through OpenRouter.
One key. Any model, any tier. AgentRoute stays out of the way until you need it.
brew install --cask Radixen-Dev/agentroute/agentroute
The Problem
One model.
One provider. Locked in.
Claude Code talks straight to Anthropic's API. That's fine until you want a cheaper model for routine edits, a different provider's flagship for the hard problems, or just to see what else is out there — none of that is a flag away.
Wiring around it means hand-editing ~/.claude/settings.json, hoping it survives the next Claude Code update, and remembering to undo it cleanly. Multiply that by every teammate who wants a different setup, and "config drift" stops being a joke.
The Solution
One binary.
Any model you want.
AgentRoute runs a small local gateway between Claude Code and OpenRouter. Point Claude Code at it once, and the model behind every Opus, Sonnet, and Haiku call is yours to choose — reversible the moment you don't want it anymore.
~/.claude/settings.json env block points hereThe Dashboard screen of agentroute tui — live preview, not a screenshot.
How It Works
Built local.
Built to be undone.
Local gateway, no cloud relay
A small HTTP server on 127.0.0.1. Your traffic goes straight to OpenRouter — nothing routes through a Radixen server.
Reversible by design
up backs up what it touches in ~/.claude/settings.json; down restores it exactly. Nothing dangling.
Switch models without restarting
Activate a different profile, or edit the active one — the gateway re-reads it per request, not once at startup.
Two front ends, one engine
A full TUI dashboard for interactive use, and a scriptable --json CLI for everything else.
Stable exit codes
0–5, documented and stable. Scripts and other agents can depend on them without parsing output.
Built to extend
Codex and Gemini CLI support is designed into the platform-adapter boundary, not bolted on later.
Installation
One binary.
Every platform.
$ brew install --cask Radixen-Dev/agentroute/agentroute
Installs the agentroute binary and keeps it updatable with brew upgrade.
$ scoop bucket add agentroute https://github.com/Radixen-Dev/scoop-agentroute $ scoop install agentroute
Recommended for Windows. Updates with scoop update agentroute.
$ git clone https://github.com/Radixen-Dev/AgentRoute $ cd AgentRoute && go build -o bin/agentroute ./cmd/agentroute
Requires Go 1.24+. Drop the resulting binary anywhere on your PATH.
PATH (pipx install litellm[proxy]). Run agentroute doctor after install — it checks for this and tells you exactly what's missing.
Commands
One CLI.
Every workflow.
Every command supports --json for scripting, with stable exit codes 0–5. The TUI wraps the same engine for interactive use.
agentroute tuiagentroute upsettings.json to point at it.agentroute downagentroute statusagentroute profilesagentroute modelsagentroute keyagentroute link / unlinkagentroute doctor--json in, exit code out.
Setup
From install
to first request.
Five steps. Two minutes. Fully reversible the whole way.
Check your environment
Confirms LiteLLM is on your PATH and nothing's already squatting on the gateway's port.
$ agentroute doctor
Set your OpenRouter key
Stored in your OS keyring by default — never written to a plaintext config file.
$ agentroute key set
Create and activate a profile
A profile maps Claude Code's heavy/balanced/fast tiers onto specific OpenRouter models.
$ agentroute profiles create default $ agentroute profiles activate default
Start the gateway
Launches the gateway and sidecar, then links Claude Code's settings to point at it.
$ agentroute up
Or skip straight to the dashboard
agentroute with no arguments opens the TUI — u starts the gateway, 2 jumps to Profiles, ? shows the full keymap. Done with it? agentroute down puts everything back.
$ agentroute
Get It
Open source.
Free forever.
GPL-3.0 licensed. No tracking, no accounts. Your key, your machine, your model choice.