Get ccmux running in under two minutes.
npm i -g ccmuxOr use npx ccmux to run without installing, or download a standalone binary.
ccmux init --recipe balancedThis creates ~/.config/ccmux/config.yaml with the balanced recipe. The recipe routes trivial questions to Haiku, complex planning to Opus, and everything else to Sonnet.
Open the config to see what was generated:
cat ~/.config/ccmux/config.yamlccmux run -- claudeThis starts the proxy on 127.0.0.1:8787, sets ANTHROPIC_BASE_URL in the child environment, and launches Claude CLI. Every API request now flows through ccmux.
While the session is running (or after), inspect the decision log:
ccmux report --since 1hDecision log entries are written to ~/.config/ccmux/logs/decisions/YYYY-MM-DD.jsonl. Each entry records the request signals, matched rule, chosen model, and cost.
After a session, let ccmux suggest rule improvements:
ccmux tune --since 24hThis analyzes your decision log and suggests policy changes to reduce cost without degrading quality.
ccmux extracted signals from each request (token count, tool usage, retry count, etc.), matched them against your policy rules, and picked the cheapest model that satisfied the rule constraints. No request bodies were modified. Your API key passed through unchanged.
- Configuration Reference - every config key explained
- Rule DSL - write custom routing rules
- Recipes - pre-built policy presets
- CLI Reference - all commands and flags