| layout | title | nav_order | parent |
|---|---|---|---|
default |
Chapter 1: Getting Started |
1 |
Claude Code Router Tutorial |
Welcome to Chapter 1: Getting Started. In this part of Claude Code Router Tutorial: Multi-Provider Routing and Control Plane for Claude Code, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.
This chapter gets Claude Code Router installed with a minimal working configuration.
- install CLI and verify command availability
- initialize a valid
config.jsonbaseline - route first Claude Code session through CCR
- verify service restart behavior after config changes
npm install -g @musistudio/claude-code-router
ccr start
ccr codeccrcommands available~/.claude-code-router/config.jsonexists and parses- routing path works for at least one provider/model
- logs are being written in expected locations
You now have a working CCR baseline for deeper routing configuration.
Next: Chapter 2: Architecture and Package Topology
The router function in custom-router.example.js handles a key part of this chapter's functionality:
module.exports = async function router(req, config) {
return "deepseek,deepseek-chat";
};This function is important because it defines how Claude Code Router Tutorial: Multi-Provider Routing and Control Plane for Claude Code implements the patterns covered in this chapter.
flowchart TD
A[router]