What is Claude Code Router?
Claude Code Router is a free, open-source Node.js CLI that redefines intelligent coding assistance by transforming Anthropic’s Claude Code into a dynamic, multi-LLM orchestration layer. Rather than locking developers into a single AI model or vendor, it acts as a smart routing engine—intelligently dispatching coding tasks across diverse language models from OpenRouter, DeepSeek, Ollama, Google Gemini, Volcengine, and more. Whether you're debugging at midnight, optimizing CI/CD pipelines, or analyzing million-line repositories, Claude Code Router adapts in real time—balancing speed, accuracy, context capacity, and *cost*—all without compromising developer experience.
Getting Started in Under 60 Seconds
No complex setup—just three quick steps. First, confirm you have Node.js v18+ and npm installed. Next, install the official Anthropic CLI: npm install -g @anthropic-ai/claude-code. Then add the router extension: npm install -g @musistudio/claude-code-router. Launch your adaptive coding assistant with ccr code, and instantly gain access to a unified interface for dozens of LLMs—no API gateways, no vendor lock-in, and zero subscription fees.
Take full control with the declarative ~/.claude-code-router/config.json file. Define fallback strategies, assign models to roles (e.g., “think” for deep reasoning, “bg” for low-priority linting), set cost thresholds per provider, and even configure custom retry logic. Need to switch from Gemini Flash to DeepSeek-V3 mid-session? Just type /model google,gemini-2.5-flash or /model deepseek,deepseek-coder-v3—no restart required.