Skip to main content
ClaudeWave
ES, Spanish
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 estrellas
  • 3.2k forks
  • 1159 issues abiertos
  • Lenguaje: TypeScript
  • Licencia: MIT
  • actualizado

Instalación

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

Nota editorial

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

Resumen de Tools

README completo en 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
Preguntas frecuentes

Lo que la gente pregunta sobre claude-code-router

¿Qué es musistudio/claude-code-router?

musistudio/claude-code-router es tools para el ecosistema de Claude AI. One local control plane for every AI agent: route across models, fuse new capabilities, orchestrate tools, and stay fully in control. Tiene 37.8k estrellas en GitHub y su última actualización registrada es del 2026-10-10.

¿Cómo se instala claude-code-router?

Puedes instalar claude-code-router clonando el repositorio (https://github.com/musistudio/claude-code-router) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar musistudio/claude-code-router?

Nuestro agente de seguridad ha analizado musistudio/claude-code-router y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene musistudio/claude-code-router?

musistudio/claude-code-router es mantenido por musistudio. La última actividad registrada en GitHub es del 2026-10-10, con 1159 issues abiertos.

¿Hay alternativas a claude-code-router?

Sí. En ClaudeWave puedes explorar tools similares en /categories/tools, ordenados por popularidad o actividad reciente.

¿Mantienes este repo? Muestra su Trust Score en tu README

La insignia muestra el Trust Score y el veredicto actuales de este repositorio y enlaza a esta página. Sigue los datos del catálogo: nadie puede comprar ni editar la puntuación que enseña.

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>

Qué significa la insignia y cómo se calcula la puntuación

Alternativas

Web del proyecto
https://ccrdesk.top/