v0.1.0 · Pre-release Open Source  ·  GPL-3.0 Go

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
On Windows? See all install options ↓

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.

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 Code
~/.claude/settings.json env block points here
Anthropic /v1/messages
AgentRoute gateway
Authenticates, maps each tier to your chosen model
proxy
LiteLLM sidecar
renders config from your active profile
routes to
OpenRouter
300+ models, one API key

The Dashboard screen of agentroute tui — live preview, not a screenshot.

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.

One binary.
Every platform.

Windows Scoop
powershell
$ scoop bucket add agentroute https://github.com/Radixen-Dev/scoop-agentroute
$ scoop install agentroute

Recommended for Windows. Updates with scoop update agentroute.

All platforms Build from source
bash
$ 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.

Needs LiteLLM on your PATH (pipx install litellm[proxy]). Run agentroute doctor after install — it checks for this and tells you exactly what's missing.

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 tui
Open the interactive dashboard: gateway status, profile & platform state, and live request activity.
Daily
agentroute up
Start the gateway and the LiteLLM sidecar, and link Claude Code's settings.json to point at it.
Daily
agentroute down
Stop the gateway and sidecar, and restore Claude Code's settings to exactly how they were.
Daily
agentroute status
Report whether the gateway is running, which profile is active, and per-platform link state.
Diagnostics
agentroute profiles
List, create, delete, and activate profiles — named mappings from tier to model that the gateway routes against.
Setup
agentroute models
Browse the OpenRouter model catalog to find candidates for your tier mapping.
Setup
agentroute key
Set, clear, or check your OpenRouter API key. Stored via env var, OS keyring, or file fallback, in that order.
Setup
agentroute link / unlink
Manually wire or unwire a specific platform's config, without touching the gateway process.
Advanced
agentroute doctor
Check for LiteLLM, a valid key, an active profile, and port conflicts before you hit them.
Diagnostics
Every command works without a TTY — no interactive prompts, no spinners on stdout, just --json in, exit code out.

From install
to first request.

Five steps. Two minutes. Fully reversible the whole way.

1

Check your environment

Confirms LiteLLM is on your PATH and nothing's already squatting on the gateway's port.

bash
$ agentroute doctor
2

Set your OpenRouter key

Stored in your OS keyring by default — never written to a plaintext config file.

bash
$ agentroute key set
3

Create and activate a profile

A profile maps Claude Code's heavy/balanced/fast tiers onto specific OpenRouter models.

bash
$ agentroute profiles create default
$ agentroute profiles activate default
4

Start the gateway

Launches the gateway and sidecar, then links Claude Code's settings to point at it.

bash
$ agentroute up
5

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.

bash
$ agentroute

Open source.
Free forever.

GPL-3.0 licensed. No tracking, no accounts. Your key, your machine, your model choice.