← all repositories
musistudio/claude-code-router

The travel adapter for Claude Code

Keep Anthropic’s CLI coding agent, but send the actual work to DeepSeek, Gemini, Ollama, or whoever else you prefer.

36.1k stars TypeScript Coding AssistantsAgents
claude-code-router
Velocity · 7d
+40
★ / day
Trend
accelerating
star history

What it does

Claude Code Router is middleware that intercepts API calls from Anthropic’s CLI coding tool and forwards them to other LLM providers. You keep the same chat interface and agent features, but the actual model can be DeepSeek, Gemini, a local Ollama instance, or anything else with an OpenAI-compatible endpoint. The router translates requests and responses so Claude Code remains none the wiser.

The interesting bit

Instead of forking Claude Code, the activate command injects environment variables that trick the native claude binary into talking to the router transparently. It is essentially a polite man-in-the-middle: Claude Code thinks it is calling Anthropic, but it is really calling your configured switchboard.

Key highlights

  • Routes to OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, SiliconFlow, and others.
  • Transformer plugins adapt provider-specific request and response formats automatically.
  • Switch models mid-session with the /model command, or route by task type (background, thinking, long context).
  • Preset system exports configurations with secrets sanitized into reusable templates.
  • Built-in non-interactive mode for GitHub Actions and headless CI runs.

Caveats

  • Without an explicit API key configured, the server is forcibly restricted to 127.0.0.1, which suggests the authors do not trust the internet with your proxy.
  • The configuration file is expansive and JSON-heavy; the project provides a web UI and interactive CLI specifically because manual editing is unwieldy.

Verdict

Grab it if you want Claude Code’s workflow with a different model bill. Ignore it if you are content with Anthropic’s native API and do not need a configurable middle layer.

Frequently asked

What is musistudio/claude-code-router?
Keep Anthropic’s CLI coding agent, but send the actual work to DeepSeek, Gemini, Ollama, or whoever else you prefer.
Is claude-code-router open source?
Yes — musistudio/claude-code-router is open source, released under the MIT license.
What language is claude-code-router written in?
musistudio/claude-code-router is primarily written in TypeScript.
How popular is claude-code-router?
musistudio/claude-code-router has 36.1k stars on GitHub and is currently accelerating.
Where can I find claude-code-router?
musistudio/claude-code-router is on GitHub at https://github.com/musistudio/claude-code-router.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.