OffRouter

Local-first router for coding agents — use your subscriptions first, API keys as fallback.

Get started

npm install -g offrouter-cli

V1 Honesty: OffRouter routes delegated work and adds routing guidance through supported hooks. It does not replace your harness's primary model call.

What is OffRouter?

OffRouter is a local routing layer for coding agents such as Claude Code, Codex CLI, Gemini CLI, and Grok Build. It lets you keep using your preferred harness while OffRouter chooses the best configured model or agent runtime for each task.

Features

Subscription-first routing

Use your core subscription capacity before falling back to API keys.

Profile guardrails

Strict allowlists and denylists to keep work and personal data cleanly separated.

Provider catalog

Manage local runtimes and external models through a unified proxy or CLI.

Usage accounting

Built-in limits and near-limit thresholds to prevent surprise charges.

MCP delegation

OffRouter can expose decision and delegation capabilities back to tools using MCP.

Hook bridges

Integrations like user-prompt-submit pass requests to OffRouter for routing insights.

OpenAI-compatible proxy

Run offrouter proxy serve to make OffRouter available to any app supporting custom base URLs.

Routing Priority

  1. Subscription-first: use allowed subscription capacity before spending through API keys.
  2. Local/private capacity: run models on your own hardware when policy or sensitivity requires it.
  3. API-key fallback: explicit, audited fallback when subscription routes are unavailable.

Install

npm install -g offrouter-cli

Requires Node.js 22 or later. See the quickstart guide for setup.

Quick Start

npm install -g offrouter-cli
offrouter init        # detect harnesses, check readiness
offrouter doctor      # diagnostics
offrouter login       # sign in to providers
offrouter install claude --profile claude-personal
offrouter mcp serve   # start delegation server

Full reference in the CLI docs.

Why OffRouter?

Privacy-first

Telemetry-off by default, audit logs stored locally, never sent anywhere unless you explicitly share them.

Deterministic policy

Routing rules are explicit, not opaque. Classifier output is a signal, not a decision.

Profile safety

Personal profiles only. Work profiles are denied by default.

Provider agnostic

Subscription-backed, local runtimes, or API-key — adapters are isolated per provider.

Documentation

Source

OffRouter is open source. Visit the GitHub repository.