Stop paying
the token tax
routre — the 10-MB gateway you forget is running
Routre sits between your apps and AI providers — like a smart power strip. One address, less cost, stays online when a provider is busy. 10 MiB, runs quietly on your computer.
$
What is routre, in plain words?
Your AI tools (Claude Code, Codex, Cursor…) normally talk directly to an AI provider. Routre sits in the middle on your computer and does three simple things: it remembers answers so you don't pay twice, it shrinks sent data without losing meaning, and it switches providers automatically if one is busy.
You change one line in your app — point it to http://127.0.0.1:20128 — and everything else is automatic. Not 80 MB + leak. Not Python/Postgres GBs. Just Go.
Pay less
Remembers identical asks & compresses tool output — ≥90% less on repetitive tasks. See savings in routre list.
Stay online
If a provider says “overloaded” (common on free models), routre tries the next one instantly. No error shown if another works.
Failover · RTK · Cache
Tiered providers with cooldown 2s→30m. Heuristic tool_result filter — no LM, no DB. sha256 LRU cache + per-agent token/cost ledger.
See what you spend
Built-in ledger per app — tokens, cost, cache hits. Doctor checks each provider. All on http://127.0.0.1:20128/ui.
Our goals
Analogy: like a travel adapter — one plug you trust, it picks the best socket behind the scenes.
Install
curl -fsSL https://raw.githubusercontent.com/mariobgsp/routre/main/install.sh | sh routre version routre setup # wizard: providers + keys → config.json + routre.env (0600) routre serve # gateway on 127.0.0.1:20128 # point any agent at it: export OPENAI_BASE_URL=http://127.0.0.1:20128 export ANTHROPIC_BASE_URL=http://127.0.0.1:20128
# download from Releases → unzip → add to PATH → routre setup routre serve # http://127.0.0.1:20128 · dashboard /ui
Self-update built in: routre update verifies sha256 — or let your AI do it.
Windows
No installer, no admin rights. One zip, one folder, one PATH entry.
# 1. Download the zip for your CPU from Releases: # https://github.com/mariobgsp/routre/releases/latest # 2. Unzip to a permanent folder: Expand-Archive .\routre_windows_amd64.zip -DestinationPath $HOME\routre # 3. Add to PATH for this user (no admin): $dir = "$HOME\routre" [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$dir", "User") $env:Path += ";$dir" # also for this shell # 4. Setup + run: routre version routre setup # wizard → config.json + routre.env (0600) next to the exe routre serve # gateway + dashboard at http://127.0.0.1:20128/ui # Verify: curl http://127.0.0.1:20128/healthz # → ok routre check # validates config + keys routre list # providers + savings + BUDGET HIT
irm https://raw.githubusercontent.com/mariobgsp/routre/main/install.ps1 | iex
# (falls back to manual zip if ps1 is not yet published — same 3 steps above)
SmartScreen: More info → Run anyway · one exe, autostart needs no admin.
Install with an AI prompt
Paste one prompt into Claude Code, Codex, Cursor, or opencode — the agent runs the same commands you would.
Install routre (github.com/mariobgsp/routre) on this machine: 1. Detect OS/CPU, fetch the latest release asset for this platform (curl install.sh on macOS/Linux, zip from Releases on Windows), verify sha256, and put the binary on PATH as routre (keep routre-cli as alias). 2. Run: routre setup (wizard; non-interactive if keys already in env) If OPENCODE_GO_API_KEY / OPENROUTER_API_KEY / ANTHROPIC_API_KEY are missing, ask me once and write them to routre.env (0600). 3. Start the gateway: routre serve (or routre start --autostart for boot). 4. Point this agent at it: export OPENAI_BASE_URL=http://127.0.0.1:20128 export ANTHROPIC_BASE_URL=http://127.0.0.1:20128 5. Verify: curl http://127.0.0.1:20128/healthz and routre list 6. Open the dashboard: http://127.0.0.1:20128/ui Keep it stdlib-only, ~10 MiB RAM. Do not install Python/Postgres/Node.
curl -fsSL https://raw.githubusercontent.com/mariobgsp/routre/main/install.sh | sh && routre setup && routre serve
Install routre on Windows (PowerShell): download routre_windows_amd64.zip from Releases, expand to $HOME\routre, add to user PATH, then run routre setup and routre serve. Verify with curl http://127.0.0.1:20128/healthz.
Tip: after setup, open http://127.0.0.1:20128/ui — keys + config without JSON.
Why not X?
| RAM idle | Install | 90% claim | |
|---|---|---|---|
| routre | 10 MiB | curl one-liner / zip, 6 platforms · AI prompt | bench-gated, build fails on regress |
| 9router | 80 MiB, leak to 4.8 GB | Node/Next.js | unbenchmarked, walked back |
| LiteLLM / Portkey | GBs (Python/Postgres/Redis) | full stack | price discount / input-only |
Quick start
routre setup # wizard: providers, URLs, keys, prices routre check # validate config + keys routre serve # gateway on 127.0.0.1:20128 routre start --autostart # daemon + boot auto-start routre list # providers + token/cost ledger routre doctor # probe every provider routre models sync # one-shot sync (serve persists new models itself) routre logs -f # tail request log routre bench -target 90 # gated metric, fails build on regress
Endpoints: /v1/chat/completions · /v1/responses · /v1/messages · /v1/models · /v1/status · /v1/usage · /healthz · /metrics · /ui (dashboard)
No CLI needed: open http://127.0.0.1:20128/ui to set keys and edit the full config in the browser (loopback-only).
Need every model at once? Copy config.all.json over config.json — 506 models through one endpoint.
Latest
Full history in CHANGELOG.md — bench-gated ≥90% tool-token savings, 10.6 MiB binary, ~10 MiB idle.