🚀 v2.0.9 - Unified router + config package with z.ai (GLM 4.7) support, advanced CLI tools, analytics, smart routing, and configuration templates!
Use Claude Code as a single interface to access multiple AI providers with intelligent routing for optimal performance, cost, and quality.
glm/glm-ccrprint mode disables attachments to avoid EMFILE (too many open files) watcher errors.
Includes all v2.0.8 improvements:
- UI üzerinden
.envanahtarları ekleme/güncelleme (TR/NL). ~/.envotomatik yükleme ile API anahtarlarının bulunması (CLI + health monitor).- z.ai Support: Native integration for GLM-4.7 via z.ai (PPInfra).
- Lightweight Mode: New
cccfunction for zero-dependency routing. - Direct GLM Alias:
glmnow launches GLM-4.7 directly via z.ai;glm-ccrkeeps router mode. - Non-interactive install: CI-friendly installer flags and env controls.
- Unified router: Built-in router service, no external dependency required.
- UI refresh: Daha sade ve responsive tasarım, TR/NL dil desteği.
If you just want to use the ccc command (Claude Code Commander) and glm alias without installing the full Node.js router stack:
-
Clone the repo:
mkdir -p ~/code git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-config
-
Source the script in your
.zshrc: Add this line to your~/.zshrc:[[ -f "$HOME/code/claude-code-router-config/cli/ccc.zsh" ]] && source "$HOME/code/claude-code-router-config/cli/ccc.zsh"
-
Configure Keys: Create
~/.envor~/.ccm_configwith your keys:export GLM_API_KEY="your_zai_key_here" export DEEPSEEK_API_KEY="your_deepseek_key_here"
-
Reload & Run:
source ~/.zshrc glm # Launches GLM-4.7 via z.ai (direct) glm-ccr # Launches GLM-4.7 via local router ccc ds # Launches DeepSeek ccc claude # Launches Official Claude (Pro)
- Node.js 16+ Support: Compatible with modern Node.js environments
- 7 Provider Support: OpenAI, Anthropic, Gemini, Qwen, GLM, OpenRouter, GitHub Copilot
- Smart Intent-Based Routing: Automatically selects the best model based on your request
- Advanced CLI Tools: Test, benchmark, analyze, and monitor your setup
- Analytics & Cost Tracking: Detailed insights into usage and spending
- Configuration Templates: Pre-optimized setups for different use cases
- Health Monitoring: Real-time provider status and automatic failover
- Enhanced Logging: Detailed logs with metrics and performance data
| Request Type | Provider | Model |
|---|---|---|
| Code writing, debugging | OpenAI | gpt-4o |
| Deep analysis, architecture | Anthropic | claude-sonnet-4 |
| Quick responses, summaries | Gemini | gemini-2.5-flash |
| Simple tasks | Qwen | qwen-plus |
| Translation, multilingual | GLM | glm-4.7 (z.ai) |
| Complex algorithms | OpenAI | o1 |
| Coding assistance | GitHub Copilot | copilot |
Use this if you want the full routing capabilities (benchmarking, analytics, etc).
pnpm add -g @halilertekin/claude-code-router-config
# System is ready! Run: ccr --helpThen run the installer to copy config files:
ccr-setupNon-interactive usage (CI):
CCR_CONFIG_NO_PROMPT=1 ccr-setup
CCR_CONFIG_OVERWRITE=1 ccr-setup
# or
ccr-setup --overwritemkdir -p ~/.claude-code-router
cp config/config.json ~/.claude-code-router/
cp config/intent-router.js ~/.claude-code-router/
cp config/smart-intent-router.js ~/.claude-code-router/Create .env file:
cp .env.example ~/.env
# Edit ~/.env with your API keyssource ~/.zshrc
node router/server.js| Provider | Link | Notes |
|---|---|---|
| OpenAI | https://platform.openai.com/api-keys | gpt-4o, o1 models |
| Anthropic | https://console.anthropic.com/settings/keys | Claude models |
| Gemini | https://aistudio.google.com/apikey | Google AI models |
| Qwen | https://dashscope.console.aliyun.com/apiKey | Alibaba Cloud |
| GLM (z.ai) | https://open.bigmodel.cn/usercenter/apikeys | Zhipu AI / z.ai |
| OpenRouter | https://openrouter.ai/keys | Multiple models |
| GitHub Copilot | https://github.com/settings/tokens | copilot scope |
| Template | Best For | Priority | Cost | Speed |
|---|---|---|---|---|
| performance-optimized | Real-time apps, chatbots | Speed | Low | ⭐⭐⭐⭐⭐ |
| cost-optimized | Budget-conscious, bulk processing | Cost | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| quality-focused | Critical tasks, research | Quality | High | ⭐⭐ |
| development | Coding, debugging | Coding | Medium | ⭐⭐⭐⭐ |
| balanced | General use | Balanced | Medium | ⭐⭐⭐⭐ |
# Quick template selection
ccr config template performance-optimized # Fastest
ccr config template cost-optimized # Cheapest
ccr config template quality-focused # Best qualityView comprehensive analytics via:
# Web Dashboard (if enabled)
ccr ui
# CLI Analytics
ccr analytics today --detailedMetrics tracked:
- Request volume and patterns
- Cost per provider/model
- Response times and latency
- Success/error rates
- Provider health status
- Provider Setup Guide (EN/TR) - Multiple providers with intelligent routing
- Complete Documentation (EN)
- Complete Documentation (TR)
- Setup Prompt (EN)
- Setup Prompt (TR)
- Configuration Templates Guide
📖 Read the Provider Setup Guide for:
- How to add multiple providers (OpenRouter, OpenAI, Gemini, Qwen)
- Inter-provider routing with automatic fallback
- Cost optimization strategies (up to 87% savings!)
- Configuration examples and troubleshooting
🔗 Hızlı Provider Ekleme:
| Provider | Get API Key | Cost (1M tokens) |
|---|---|---|
| GLM (z.ai) | Sign Up | ~$0.50 ⭐ |
| Qwen | Sign Up | ~$0.10 |
| Gemini | Sign Up | ~$0.01 |
| OpenAI | Sign Up | ~$2.50 |
| OpenRouter | Sign Up | Variable |
# Add to ~/.env
export GLM_API_KEY="your_key_here"
export OPENROUTER_API_KEY="your_key_here"
export GEMINI_API_KEY="your_key_here"
# Verify setup
ccr status --detailed
ccr test glm
ccr benchmark --allMIT © Halil Ertekin
If you find this useful, please give it a ⭐ on GitHub!