Skip to content

Commit 6565093

Browse files
committed
Unify router core and CLI
1 parent c914295 commit 6565093

37 files changed

Lines changed: 1567 additions & 1503 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
## 2.0.0
4+
- Unified router service built into this package (no external router dependency).
5+
- Native CLI lifecycle commands (start/stop/restart/status/code/ui).
6+
- Streaming translation between Anthropic and OpenAI-style endpoints.
7+
- Dashboard now served by the router at `/ui`.
8+
- Default config uses `smart-intent-router.js` and adds HOST/PORT.
9+

LICENSE

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,4 @@ SOFTWARE.
2424

2525
## Attribution
2626

27-
This package provides configuration for @musistudio/claude-code-router.
28-
Original project: https://github.com/musistudio/claude-code-router
29-
30-
The configuration files and intent-based routing logic in this package are designed to work with the original Claude Code Router created by musistudio.
27+
This package provides a unified router and configuration for Claude Code workflows.

MEDIUM_BLOG_POST.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class ClaudeCodeRouterConfig < Formula
276276

277277
def install
278278
system "#{Formula["node"].opt_bin}/npm", "install", "-g",
279-
"@musistudio/claude-code-router", "--prefix", prefix
279+
"@halilertekin/claude-code-router-config", "--prefix", prefix
280280

281281
# Setup configuration directory
282282
config_dir = File.join(Dir.home, ".claude-code-router")
@@ -438,7 +438,7 @@ Ready to try it yourself? Installation is simple:
438438
439439
```bash
440440
# Install via npm
441-
npm install -g claude-code-router
441+
npm install -g @halilertekin/claude-code-router-config
442442

443443
# Or via Homebrew (macOS)
444444
brew install halilertekin/tap/claude-code-router-config
@@ -473,6 +473,6 @@ The best part? We're just getting started. The future of AI routing is intellige
473473
474474
**About the Author**: _Halil Ertekin is a software engineer passionate about developer tools and AI infrastructure. He built Claude Code Router Config to solve his own challenges with managing multiple AI providers and is now helping thousands of developers do the same._
475475
476-
**Connect**: [GitHub](https://github.com/halilertekin) | [NPM](https://www.npmjs.com/~musistudio) | [Twitter](https://twitter.com/halilertekin)
476+
**Connect**: [GitHub](https://github.com/halilertekin) | [NPM](https://www.npmjs.com/~halilertekin) | [Twitter](https://twitter.com/halilertekin)
477477
478-
**Try it now**: `npm install -g claude-code-router` or visit our [GitHub repository](https://github.com/halilertekin/claude-code-router-config) to learn more.
478+
**Try it now**: `npm install -g @halilertekin/claude-code-router-config` or visit our [GitHub repository](https://github.com/halilertekin/claude-code-router-config) to learn more.

NPM_README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ After installation:
9797

9898
4. **Start router**:
9999
```bash
100+
ccr start
100101
ccr code
101102
```
102103

@@ -178,16 +179,8 @@ The installer creates:
178179
- [Complete Documentation](https://github.com/halilertekin/claude-code-router-config/docs/FULL_DOCUMENTATION_EN.md)
179180
- [GitHub Repository](https://github.com/halilertekin/claude-code-router-config)
180181

181-
## Attribution
182-
183-
This package provides configuration for [@musistudio/claude-code-router](https://github.com/musistudio/claude-code-router), the original tool that enables Claude Code functionality with multiple AI providers.
184-
185-
The original Claude Code Router project is developed and maintained by musistudio. This package contains pre-configured routing logic and provider configurations.
186-
187182
## License
188183

189184
MIT © [Halil Ertekin](https://github.com/halilertekin)
190185

191186
---
192-
193-
**Note**: This is a configuration package. Requires the original [@musistudio/claude-code-router](https://github.com/musistudio/claude-code-router) to function.

PUBLISHING.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Claude Code Router Config - Publishing Guide
22

3-
## Attribution
4-
5-
This package provides configuration for @musistudio/claude-code-router.
6-
Original project: https://github.com/musistudio/claude-code-router
7-
83
## NPM Publishing
94

105
### 1. Update package.json
116
```bash
127
# Already updated with:
138
# - username: halilertekin
149
# - email: halil@ertekin.me
15-
# - attribution to @musistudio/claude-code-router
1610
```
1711

1812
### 2. Build and Test
@@ -160,4 +154,4 @@ brew install claude-code-router-config
160154

161155
# Verify installation
162156
ccr status
163-
```
157+
```

README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Claude Code Router Config - Advanced Multi-Provider Setup
22

3-
🚀 **v1.3.9** - Now with z.ai (GLM 4.7) support, advanced CLI tools, analytics, smart routing, and configuration templates!
3+
🚀 **v2.0.0** - Unified router + config package with z.ai (GLM 4.7) support, advanced CLI tools, analytics, smart routing, and configuration templates!
44

55
Use Claude Code as a single interface to access multiple AI providers with intelligent routing for optimal performance, cost, and quality.
66

7-
## ✨ New in v1.3.9
7+
## ✨ New in v2.0.0
88
- **z.ai Support**: Native integration for GLM-4.7 via z.ai (PPInfra).
99
- **Lightweight Mode**: New `ccc` function for zero-dependency routing.
1010
- **Direct GLM Alias**: Type `glm` to launch Claude Code with GLM-4.7 immediately.
1111
- **Non-interactive install**: CI-friendly installer flags and env controls.
12+
- **Unified router**: Built-in router service, no external dependency required.
1213

1314
## 🚀 Setup on Another Machine (Fastest Way)
1415

@@ -94,21 +95,16 @@ ccr-setup --overwrite
9495

9596
### Option 2: Manual Setup
9697

97-
#### 1. Install Dependencies
98-
99-
```bash
100-
pnpm add -g @musistudio/claude-code-router
101-
```
102-
103-
#### 2. Copy Configuration Files
98+
#### 1. Copy Configuration Files
10499

105100
```bash
106101
mkdir -p ~/.claude-code-router
107102
cp config/config.json ~/.claude-code-router/
108103
cp config/intent-router.js ~/.claude-code-router/
104+
cp config/smart-intent-router.js ~/.claude-code-router/
109105
```
110106

111-
#### 3. Set Up Environment Variables
107+
#### 2. Set Up Environment Variables
112108

113109
Create `.env` file:
114110

@@ -117,11 +113,11 @@ cp .env.example ~/.env
117113
# Edit ~/.env with your API keys
118114
```
119115

120-
#### 4. Start Router
116+
#### 3. Start Router
121117

122118
```bash
123119
source ~/.zshrc
124-
ccr code
120+
node router/server.js
125121
```
126122

127123
## API Key Setup
@@ -179,20 +175,12 @@ Metrics tracked:
179175
- [Setup Prompt (TR)](docs/SETUP_PROMPT.md)
180176
- [Configuration Templates Guide](templates/README.md)
181177

182-
## Attribution
183-
184-
This package provides configuration for [@musistudio/claude-code-router](https://github.com/musistudio/claude-code-router), an excellent tool that enables Claude Code functionality with multiple AI providers.
185-
186-
The original Claude Code Router project is developed and maintained by musistudio. This package contains pre-configured routing logic, advanced CLI tools, and provider configurations to help users get started quickly and optimize their AI workflows.
187-
188178
## License
189179

190180
MIT © [Halil Ertekin](https://github.com/halilertekin)
191181

192182
---
193183

194-
**Note**: This is an enhanced configuration package. To use it, you need to install the original [@musistudio/claude-code-router](https://github.com/musistudio/claude-code-router) package.
195-
196184
## 🌟 Show Your Support
197185

198186
If you find this useful, please give it a ⭐ on [GitHub](https://github.com/halilertekin/CC-RouterMultiProvider)!

0 commit comments

Comments
 (0)