AnyRouter
AnyRouter CLIv0.3.0

Run your coding agent against any model. One command.

Point Claude Code, Codex, or Grok Build at the AnyRouter gateway — one key, automatic failover, no shell edits. First run sets you up; every run after drops straight into your tool.

Copy and paste into terminal to try

npx @anyr/cli claude
AnyRouter
Signed in as you@anyrouter.dev
Gateway reachable · 122 models · auto-failover
· Launching interactive menu…

v0.3.0 · Unified gateway for your coding tools · Claude Code

Tool
Claude Code
Model
auto
Preset
@preset/coding-stack
API key
sk-ar••••

› Select model / presetauto

Effort level ‹ high ›

Load hub ‹ none ›

▶ Open Claude Code

↑↓ navigate←→ changeEnter selectx quit
3launchers122+modelsauto-failoverhub-awareclean exit

01Launchers

Pick your agent

One CLI wraps the agents you already use. The same stored key powers every launcher — copy a command and run it, no install step.

Claude Code

Anthropic-compatible

Launch Claude Code through AnyRouter. Failover, logging, and cost tracking come for free.

Setup guide

Codex

OpenAI-compatible

Drive OpenAI Codex against any model in the catalog. Set the effort level right from the menu.

Setup guide

Grok Build

xAI Grok CLI

Run xAI's Grok Build with the same one-key setup and automatic fallback on rate limits.

Setup guide

02Skills & Knowledge Hub

Load a hub straight into a session

A hub is your agent's context — skills, prompts, knowledge, and plugins — managed in the dashboard and pulled to any machine. Point a launcher at one and it syncs, shows you exactly what landed, then starts your agent with that context already in place.

SkillsPromptsKnowledgePlugins
npx @anyr/cli claude --hub my-hub
$npx @anyr/cli claude --hub my-hub
·Syncing my-hub from anyrouter.dev …
commit-style · skill ✓ clean
api-conventions · skill ✓ clean
prd-template · prompt ✓ clean
architecture.md · knowledge ✓ clean
legacy-helper · skill ⚠ review · external fetch
untrusted-import · skill ✕ blocked · not synced
4 items written · 1 flagged · 1 blocked → ~/.anyrouter/hubs/my-hub
Launching Claude Code · --plugin-dir ~/.anyrouter/hubs/my-hub
·skills loaded as anyrouter-my-hub:commit-style, anyrouter-my-hub:api-conventions
✓ ready — your agent starts with that context in place

Pick a hub — or let it list them

Pass --hub my-hub to load one directly, or run a launcher on its own and the CLI lists every hub you can see so you can pick one interactively.

Every item carries a scan verdict

Each skill, prompt, and doc is scanned for prompt injection before it can sync. The CLI prints exactly what landed — flagged items never reach your machine.

Loaded with --plugin-dir

The hub syncs to ~/.anyrouter/hubs/<slug> as a self-contained Claude Code plugin, then launches with --plugin-dir pointed at it. Your ~/.claude/skills is never touched.

Skills load, namespaced

Claude auto-discovers the hub's skills as anyrouter-my-hub:<skill> — your agent starts with that context already in place.

One source of truth

One hub, shared with your whole team

Build a hub once in the dashboard — skills, prompts, knowledge, and plugins versioned together. Teammates pull the same context, and you can publish it read-only for everyone.

my-hub

28 items · synced & scanned · v14

Team + Public
Skills8
Prompts5
Knowledge12
Plugins3

You

Pull it onto any machine — --hub my-hub and your agent starts with full context.

Your team

6 teammates run the exact same skills & knowledge — no copy-paste, no drift.

ARJLMKSP+3

Everyone

Publish read-only at anyrouter.dev/h/my-hub — anyone can load it.

03Guided menu

Interactive when you want it

Run a launcher with no flags and you get a guided menu — preview config, change model or effort, load a hub, then launch. Pass flags and it skips straight through.

  • Pick model or preset

    Arrow through 122+ models or a saved @preset — no slug to memorize.

  • Tune effort inline

    Set reasoning effort from low to xhigh before the agent starts.

  • Attach a hub

    Load your skills & knowledge for this session, right from the menu.

  • All keyboard, no mouse

    ↑↓ to navigate, ←→ to change, Enter to launch. Scriptable too.

interactive menu
AnyRouter

v0.3.0 · Unified gateway for your coding tools · Claude Code

Configuration

Tool
Claude Code
Model
auto
Preset
@preset/coding-stack
API key
sk-ar****
↑↓ navigate · ←→ change · Enter select · x quit

04Under the hood

How it works

Three steps, once. After that, every launch goes straight into your tool.

01

Sign in once

Paste an sk-ar- key or log in through the browser. Your profile is saved locally and reused by every launcher — no re-auth per tool.

02

Pick any model

Choose with --model or a preset from 122+ models. AnyRouter handles auto-failover on rate limits and provider errors.

03

Launch the real agent

The CLI injects base URL, auth, and model into the child process only, then spawns the real claude / codex / grok.

Your config follows you

Keys, presets, and hubs live in AnyRouter and load on any machine. Sign in and your whole setup is just there.

Clean exit, every time

Credentials live only in the agent's process. When it exits, they're gone — no env vars or files left behind.

05Models

Swap models in one flag

No provider accounts to rotate, no settings.json edits. Change --model and AnyRouter handles routing, failover, and billing.

terminalbash
# Swap models without touching config
npx @anyr/cli claude --model z-ai/glm-5.2
 
# Let a preset pick the model, set reasoning depth
npx @anyr/cli claude --model auto --effort high
 
# Same key works for Codex
npx @anyr/cli codex --model anthropic/claude-sonnet-4.6 --effort xhigh

Per-project defaults live in anyrouter.yaml — check it in, and the whole team gets the same routing, effort, and hub. See the configuration reference.

anyrouter.yamlyaml
project root
# defaults for every launcher
default: @preset/coding-stack
effort: high
hub: my-hub
 
# per-launcher overrides
claude:
model: anthropic/claude-sonnet-4.6
 
codex:
model: z-ai/glm-5.2
effort: xhigh
 
# auto-failover on these statuses
fallback: [ 429, 401, 5xx ]

06Documentation

Everything else is in the docs

Guides for each launcher, the hub, configuration, and security — all in one place.

Try it in your terminal

Free to start. Paste a key or log in on first run — then every coding session routes through AnyRouter.

Copy and paste into terminal to try