Skip to main content
ClaudeWave
EN, English
musistudio / Tools

claude-code-router

One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control.

  • 37.8k stars
  • 3.2k forks
  • 1,159 open issues
  • Language: TypeScript
  • License: MIT
  • updated

Install

Terminal
git clone https://github.com/musistudio/claude-code-router
  1. Clone the repository.
  2. Follow the README for installation and usage instructions.

Editor's note

Claude Code Router is a TypeScript proxy layer that sits between Claude Code and any backend model provider, intercepting API requests and forwarding them to whichever model the developer specifies. Rather than locking Claude Code to Anthropic's own models, it supports providers including OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow, with routing rules defined in a JSON config file. Developers can assign different models to different task types, such as background tasks, long-context work, or reasoning, and switch models mid-session using Claude Code's `/model` command. A `ccr model` CLI command handles provider and model management from the terminal. Request and response transformation is handled via a plugin system, letting developers adapt payloads for provider-specific API formats. GitHub Actions integration allows Claude Code tasks to run in CI pipelines by enabling a non-interactive mode. The project targets developers who want to use Claude Code's interface and update path while controlling costs or model selection through third-party providers.

README

Tools overview

Full README on GitHub

Claude Code Router

Manage every agent and provider from one place.

Connect Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, WorkBuddy, and compatible API clients to the providers you choose—then route, fail over, extend, and observe every request from one app.

Why use Claude Code Router?

Claude Code Router (CCR) is a local model gateway and control plane for coding agents. It gives Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, WorkBuddy, and compatible API clients one stable local endpoint, while you manage the providers, models, accounts, routing rules, and tools behind it from one place.

Use CCR to:

  • Manage all agents and providers together instead of maintaining a separate model configuration for every client.

  • Switch providers or models without changing your workflow or repeatedly editing agent configuration files.

  • Keep requests running with retries, credential pools, key rotation, and ordered fallback models.

  • Add capabilities to existing models with Fusion vision, web search, MCP tools, and ToolHub.

  • See what actually happened through request logs, resolved routes, latency, token usage, cost estimates, and account status.

CCR supports OpenAI Chat / Responses, Anthropic Messages, Gemini Generate Content / Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible providers.

Supported Agents

Claude Code (CLI & APP) Codex (CLI & APP) Grok CLI (CLI) Kimi CLI (CLI) Kilo Code (CLI) OpenCode (CLI & APP) Pi (CLI) ZCode (APP) Claude Design (APP) WorkBuddy (APP)

Quick Start

Desktop app (recommended)
  1. Download Claude Code Router for macOS, Windows, or Linux, then launch the app.

    Windows Linux macOS (Apple Silicon) macOS (Intel)

  2. Open Providers → Add Provider. Choose a built-in preset or a custom endpoint, enter the API key, select the protocol and models, then save.

  3. Open Server and click Start. The local model gateway listens on http://127.0.0.1:3456 by default.

  4. Open Agent Config, choose Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, or WorkBuddy, select a model, and apply the profile.

  5. Start using your agent. Open Logs to confirm the resolved provider, model, status, tokens, latency, and errors.

Your agent is now connected to CCR. To add conditions, retries, request rewrites, or fallback models, open Routing.

CLI

The npm CLI requires Node.js 22 or newer. It starts the same gateway and a browser-based management UI without Electron:

npm install -g @musistudio/claude-code-router
ccr ui

Open http://127.0.0.1:3458, then follow the same Providers → Server → Agent Profiles flow above. The model gateway remains at http://127.0.0.1:3456. See the CLI reference for service modes, authentication, and profile commands.

Docker
npm run docker:compose:up

Docker exposes the management UI and gateway routes through http://127.0.0.1:3458 by default. The npm script prepares the local plugin-capable ai-gateway runtime before building the image when ../../next-ai/gateway exists. Read the Docker deployment guide before exposing CCR remotely.

Build desktop apps

Install Node.js 22+, then run npm ci.

TargetCommandOutput
macOS local DMG/ZIPnpm run build:app:macrelease-local/
Windows local NSIS installernpm run build:app:winrelease-local/

Windows app packaging must run on Windows x64 because better-sqlite3 ships a native Electron module. The release workflow builds macOS on macOS runners and Windows on windows-latest when a v* tag is pushed.

How it works

Claude Code · Claude Design · Codex · Grok CLI · Kimi CLI · Kilo Code · OpenCode · Pi · ZCode · WorkBuddy · Compatible API clients
                              │
                              ▼
                 Claude Code Router :3456
          Profiles · Routing · Credentials · Tools · Logs
                              │
                              ▼
             Selected provider, model, and account
Frequently asked

What people ask about claude-code-router

What is musistudio/claude-code-router?

musistudio/claude-code-router is tools for the Claude AI ecosystem. One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control. It has 37.8k GitHub stars and its last recorded update is dated 2026-10-10.

How do I install claude-code-router?

You can install claude-code-router by cloning the repository (https://github.com/musistudio/claude-code-router) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is musistudio/claude-code-router safe to use?

Our security agent has analyzed musistudio/claude-code-router and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains musistudio/claude-code-router?

musistudio/claude-code-router is maintained by musistudio. The last recorded GitHub activity is dated 2026-10-10, with 1159 open issues.

Are there alternatives to claude-code-router?

Yes. On ClaudeWave you can browse similar tools at /categories/tools, sorted by popularity or recent activity.

Maintain this repo? Show its Trust Score in your README

The badge shows this repository's current Trust Score and verdict, and links back to this page. It follows the catalogue data: nobody can buy or edit the score it displays.

ClaudeWave Trust Score for musistudio/claude-code-router
Markdown (README)
[![ClaudeWave Trust Score for musistudio/claude-code-router](https://claudewave.com/api/badge/musistudio-claude-code-router)](https://claudewave.com/en/repo/musistudio-claude-code-router)
HTML
<a href="https://claudewave.com/en/repo/musistudio-claude-code-router"><img src="https://claudewave.com/api/badge/musistudio-claude-code-router" alt="ClaudeWave Trust Score for musistudio/claude-code-router" width="320" height="64"></a>

What the badge means and how the score is computed

Alternatives

Project homepage
https://ccrdesk.top/