simplerouter instantly launches Claude Code against any
OpenRouter model with a launch ui for selecting your model (and inference
provider, if desired).
The only configuration required is pasting your openrouter API key on first launch. Unlike other "claude code routers", simplerouter configures everything automatically on launch, so your normal Claude Code setup is untouched and you can stop messing with environment variables, local webservers, or manually editing your .claude files.
simplerouter # first run: pick a key + model
simplerouter --model z-ai/glm-5.2 . # launch with a specific model in the current dirRequires an installed claude CLI.
Windows:
irm https://raw.githubusercontent.com/kdsuomi/cc-simplerouter/main/scripts/install.ps1 | iexmacOS/Linux:
curl -fsSL https://raw.githubusercontent.com/kdsuomi/cc-simplerouter/main/scripts/install.sh | shThe install scripts download the latest GitHub Release binary and install it to
~/.local/bin. macOS release binaries are Apple Silicon only.
Requires Go.
powershell -ExecutionPolicy Bypass -File .\scripts\build_install.ps1sh ./scripts/build_install.shThese scripts build from the cloned repo and install the result to ~/.local/bin.
Run simplerouter to open the interactive model picker.
- ↑ / ↓ — move the highlight (auto-pages at the top/bottom of a page)
- ← / → — flip pages
- type — filter live by id or name
- ↵ — launch the highlighted model
- Tab — open provider selection for the highlighted model (see below)
- esc — cancel
The list is pre-filtered to models usable by Claude Code and ordered by OpenRouter popularity, with recommended models pinned at the top.
simplerouter default's to OpenRouter's choice of provider. If you want to select a specific inference provider, press Tab on a highlighted model:
OpenRouter only honors provider routing in the request body, and Claude Code doesn't let you add body fields. So when you pin a provider, simplerouter starts a tiny localhost proxy for the session and pointsANTHROPIC_BASE_URL at it; the proxy injects provider.only into each request before forwarding to OpenRouter. It binds to 127.0.0.1, makes no changes to
your OpenRouter account, and shuts down when claude exits.
Note: pinning sets
allow_fallbacks: false, so a transient error from the chosen provider isn't absorbed by OpenRouter's fallback and Claude Code will retry. If a provider is flaky, just pick another (or skip provider selection and let OpenRouter route).
simplerouter [--model MODEL] [--reset-key] [--disable-thinking] [path-or-prompt] [-- CLAUDE_ARGS...]
--model MODEL— OpenRouter model id, name, or unique suffix (skips the picker)--reset-key— forget the saved OpenRouter API key, then prompt again--disable-thinking— drop Claude Code's Anthropic-specific thinking/beta request fields (see below)
Only for the launched process. Notably:
ANTHROPIC_BASE_URL→ OpenRouter (or the local provider proxy, when pinned)ANTHROPIC_AUTH_TOKEN→ your OpenRouter key; all model tiers (opus/sonnet/ haiku/subagent) point at your chosen modelCLAUDE_CODE_AUTO_COMPACT_WINDOW→ the model's context lengthCLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false→ disables the "suggest what to type next" feature, which otherwise re-sends the whole conversation each turn just to predict your next prompt and wastes money.
simplerouter targets OpenRouter models that work through Claude Code's
Anthropic-compatible API path — i.e. text models that support tool calling
(which the picker already filters for).
By default it preserves Claude Code's normal thinking behavior. If a provider
chokes on Claude Code's thinking/beta request fields, retry with
--disable-thinking:
simplerouter --disable-thinking --model XXX.