AI Card Bao JBWICTURBO.AICARDBAO.COM
Home / open source / Claude Code Router
AI TOOL / #12890

Claude Code Router

A local control interface for all AI agents, enabling cross-model routing, integration of new capabilities, and orchestration tools while maintaining full controllability.

Introduction

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

In v3.1.6, the Codex desktop app shows the current model provider's balance and usage. Codex profiles can route native image generation and editing through a configured Images API provider. Release notes · Codex setup

Desktop app (recommended)

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

Windows

Linux

macOS (Apple Silicon)

macOS (Intel)

  1. Open Providers → Add Provider. Choose a built-in preset or a custom endpoint, enter the API key, select the protocol and models, then save.
  2. Open Server and click Start. The local model gateway listens on http://127.0.0.1:3456 by default.
  3. 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.
  4. 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@latest
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

Core capabilities

AreaHighlights
AgentsProfiles for Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, and WorkBuddy; model overrides; scopes; environment settings; CLI and app launch entries; multi-instance workflows
ProvidersPresets and custom endpoints; protocol probing; model discovery; connectivity checks; local login import where supported; single keys and credential pools
Models & routingSearchable catalog; model descriptions for task selection; conditions on headers and bodies; prefixes; rewrites; retries; ordered fallbacks
Tools & extensionsFusion models; ToolHub; built-in browser automation; Chrome login-state import; wrapper and core gateway plugins; local routes and virtual models
Access & quotasSeparate CCR client keys with expiration and local request, token, and image limits
ObservabilityRequest and response details; resolved provider, model, and credential; status; latency; tokens; estimated cost; tool calls; agent traces
AgentClawAgent relay through Weixin iLink, WeCom, Slack, Discord, Telegram, LINE, Feishu, and DingTalk

Go deeper when you are ready

The complete documentation lives at ccrdesk.top.

Support & Sponsoring

If you find this project helpful, please consider sponsoring its development. Your support is greatly appreciated.

One-time support via Ko-fi

International sponsorship

Alipay

WeChat Pay

Our Sponsors

A huge thank you to all our sponsors for their generous support.

Z智谱

AIHubmix

BurnCloud

302.AI

RunAPI

TeamoRouter

code0.ai

claudeapi

Qiniu Cloud AI

Fenno.ai

Unity2.Ai

无限星河

Community Sponsors

@Simon Leischnig @duanshuaimin @vrgitadmin @*o @ceilwoo @*说

@*更 @K*g @R*R @bobleer @*苗 @*划

@Clarence-pan @carter003 @S*r @*晖 @*敏 @Z*z

@*然 @cluic @*苗 @PromptExpert @*应 @yusnake

@*飞 @董* @*汀 @*涯 @*:-) @**磊

@*琢 @*成 @Z*o @*琨 @congzhangzh @*_

@Z*m @*鑫 @c*y @*昕 @witsice @b*g

@*亿 @*辉 @JACK @*光 @W*l @kesku

@biguncle @二吉吉 @a*g @*林 @*咸 @*明

@S*y @f*o @*智 @F*t @r*c @qierkang

@*军 @snrise-z @*王 @greatheart1000 @*王 @zcutlip

@Peng-YM @*更 @*. @F*t @*政 @*铭

@*叶 @七*o @*青 @**晨 @*远 @*霄

@吉 @飞 @驰 @x*g @东 @*落

@哆*k @*涛 @苗大 @*呢 @d*u @crizcraig

s*s *火 *勤 锟 *涛 明

*知 *语 *瓜 **新

If your name is masked, please contact me via my homepage email to update it with your GitHub username.

License

This project is licensed under the MIT License.

Visits:49 Updated:2026-12-04 AI tools

Related

Xiaoxiong Fuel Consumption Xiaoxiong Fuel Consumption is a tool designed for querying fuel consumption data. Its main functions include providing daily oil price information for all provinces across the country, as well as detailed fuel consumption reports for various vehicles. These reports include both user-generated evaluations of fuel efficiency and official data provided by the Ministry of Industry and Information Technology. Additionally, there is a fuel consumption ranking system that helps users understand how their vehicle compares in terms of fuel efficiency. Everything Everything is a file search engine on Windows systems that can quickly locate files and folders based on file names. It is known for being lightweight and super fast for searching. Enter the name of the file you are looking for. It can be said that it only takes a moment to find it for you. Just double-click it. Kimi Intelligent Assistant Kimi Intelligent Assistant is an AI dialogue creation tool developed by Moonshot AI, based on their own proprietary Moonshot large model. It is similar to other AI dialogue tools such as ChatGPT, Tongyi Qianwen, and Wenxin Yiyan. 5sing Music 5sing Music is a platform that aggregates a vast collection of original songs and cover versions created by online singers, which is why it is often referred to as the "Chinese Original Music Hub." Many lesser-known online singers tend to upload their music to this platform. Many of those truly outstanding and hidden gems among online songs are actually released on this platform. Google Scholar Mirror Site As is well known, Google Scholar is a very useful search engine for academic literature resources. Through it, you can find research papers, books, conference proceedings, and other materials in various academic fields, which can assist you in obtaining academic information and conducting research. However, since Google has withdrawn from the Chinese market, many users are no longer able to use this service directly. Listen 1 Music Player Listen 1 Music Player: “Listen 1” is an open-source music aggregation, search, and playback tool. It supports platforms such as NetEase Cloud Music, QQ Music, KuGou, Bilibili, Migu, and Qianqian. In other words, you only need to download the Listen 1 software in order to listen to music from these seven platforms.