CLI Reference

Back to home

V1 Honesty: OffRouter routes delegated work. It does not replace your harness's primary model call.

Setup Commands

offrouter init

Detect installed harnesses, build an initial config template, and check readiness. Interactive runs may prompt once for anonymous telemetry consent; use --telemetry / --no-telemetry to set it without prompting. Non-interactive and CI runs leave telemetry undecided.

offrouter init
offrouter init --dry-run
offrouter init --dry-run --json
offrouter init --telemetry
offrouter init --no-telemetry

offrouter install

Install OffRouter into a harness profile.

offrouter install claude --profile claude-personal --dry-run
offrouter install claude --profile claude-personal

offrouter login

List available provider categories and detect auth readiness.

offrouter login

offrouter uninstall

Remove OffRouter from a harness profile and restore previous files.

offrouter uninstall claude --profile claude-personal --dry-run
offrouter uninstall claude --profile claude-personal

Daily Commands

offrouter route explain

Explain how OffRouter would route a prompt under policy. Expected local policy checks only without live provider calls.

offrouter route explain "explain this repo" --profile claude-personal
offrouter route explain "explain this repo" --profile claude-personal --json

offrouter status

Show provider and profile status.

offrouter status
offrouter status --providers --json

offrouter models

List configured provider ids.

offrouter models

offrouter doctor

Report Node version, config validity, harness detection, provider readiness, MCP serve path, and telemetry status. Secret values are never printed.

offrouter doctor
offrouter doctor --json
offrouter doctor --profile claude-personal

offrouter telemetry

View or change anonymous usage telemetry consent. See the telemetry docs.

offrouter telemetry status
offrouter telemetry status --json
offrouter telemetry enable
offrouter telemetry disable

offrouter update

Fetch and cache the latest model catalog from the remote source. No telemetry transmitted.

offrouter update
offrouter update --json
offrouter update --dry-run

Integration Commands

offrouter mcp serve

Start the MCP server for delegation tools over stdio.

offrouter mcp serve

offrouter proxy serve

Start a local OpenAI Responses-compatible proxy for apps that support custom base URLs.

offrouter proxy serve
offrouter proxy serve --port 8787 --host 127.0.0.1
offrouter proxy serve --profile custom-profile

offrouter hooks claude user-prompt-submit

Claude UserPromptSubmit bridge: read stdin, emit hook JSON only.

offrouter hooks claude user-prompt-submit --profile claude-personal
offrouter hooks claude user-prompt-submit --trusted-workspace

offrouter profiles

List configured profiles and their active status.

offrouter profiles
offrouter profiles --json

Environment Variables

The CLI detects these by name only (never prints values):

ANTHROPIC_API_KEY
OPENAI_API_KEY
OPENROUTER_API_KEY
XAI_API_KEY
GOOGLE_API_KEY
GEMINI_API_KEY
OFFROUTER_API_KEY
OFFROUTER_PROFILE
OFFROUTER_WORKSPACE_TRUSTED
OFFROUTER_HOME
OLLAMA_HOST
DO_NOT_TRACK