@dedenlabs/claude-code-router-cli 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +30 -26
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- [![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://github.com/dedenlabs/claude-code-router-cli)
5
+ [![Version](https://img.shields.io/badge/version-2.0.2-blue.svg)](https://github.com/dedenlabs/claude-code-router-cli)
6
6
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
7
  [![Node](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg)](https://nodejs.org/)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
@@ -93,7 +93,11 @@ npm install @dedenlabs/claude-code-router-cli
93
93
 
94
94
  **启动路由服务:**
95
95
  ```bash
96
+ # 前台运行
96
97
  ccr start
98
+ # 或
99
+ # 后台运行
100
+ ccr start -b
97
101
  ```
98
102
 
99
103
  **配置 Claude 环境变量:**
@@ -183,8 +187,8 @@ ccr stop # 停止服务
183
187
  ```javascript
184
188
  // external-rules/user-preference.js
185
189
  const userPreferences = {
186
- 'premium@company.com': { provider: 'opus-minimax', model: 'glm-4.6' },
187
- 'standard@company.com': { provider: 'sonnet-minimax', model: 'glm-4.5-air' }
190
+ 'premium@company.com': { provider: 'opus', model: 'glm-4.6' },
191
+ 'standard@company.com': { provider: 'sonnet', model: 'glm-4.5-air' }
188
192
  };
189
193
 
190
194
  function checkUserPreference(context) {
@@ -444,6 +448,8 @@ lsof -i :3456
444
448
 
445
449
  # 更换端口
446
450
  ccr start --port 3457
451
+ # 后台运行
452
+ ccr start -b
447
453
  ```
448
454
 
449
455
  **Q: 路由不生效,模型没有切换**
@@ -510,10 +516,7 @@ npm install
510
516
 
511
517
  # 构建项目
512
518
  npm run build
513
-
514
- # 运行测试
515
- npm test
516
-
519
+
517
520
  # 开发模式
518
521
  npm run dev
519
522
  ```
@@ -562,21 +565,27 @@ export class MyTransformer extends BaseTransformer {
562
565
  - 将最常用的规则放在前面(高优先级)
563
566
  - 避免复杂的条件判断
564
567
  - 合理设置缓存TTL
568
+
565
569
 
566
- ### 3. 监控建议
570
+ ## 📈 版本历史
567
571
 
568
- ```bash
569
- # 查看性能统计
570
- ccr stats
572
+ ### v2.0.2 (2025-12-14)
571
573
 
572
- # 监控内存使用
573
- ccr monitor --memory
574
+ **📚 文档修复**
574
575
 
575
- # 检查规则命中情况
576
- ccr stats --rules
577
- ```
576
+ **✅ README文档更新**
577
+ - 修复版本徽章显示错误(从2.0.0更新为2.0.2)
578
+ - 更新版本历史记录,添加v2.0.1和v2.0.2的详细说明
579
+ - 完善命令行使用示例和文档描述
578
580
 
579
- ## 📈 版本历史
581
+ ### v2.0.1 (2025-12-14)
582
+
583
+ **🎯 用户体验优化**
584
+
585
+ **✅ 前台模式默认运行**
586
+ - `ccr start` 默认在前台运行,显示详细运行信息
587
+ - 可通过 `--background` / `-b` 参数切换到后台模式
588
+ - 更新命令行帮助文档和使用示例
580
589
 
581
590
  ### v2.0.0 (2025-12-14)
582
591
 
@@ -612,7 +621,7 @@ ccr stats --rules
612
621
  - 确保路由决策的准确性和稳定性
613
622
  - 提供模拟测试和性能监控工具
614
623
 
615
- ### v1.x (旧版本)
624
+ ### v1.x (原版本)
616
625
  - 基础路由功能
617
626
  - 固定规则配置
618
627
 
@@ -625,8 +634,7 @@ ccr stats --rules
625
634
  | **日志系统** | 基础输出 | ✅ 可视化智能日志 |
626
635
  | **配置迁移** | 手动 | ✅ 自动迁移工具 |
627
636
  | **思考模式** | 无 | ✅ GLM思考转换器 |
628
- | **包名** | @musistudio/... | @dedenlabs/... |
629
- | **文档** | 基础 | ✅ 完整示例和指南 |
637
+ | **包名** | @musistudio/... | @dedenlabs/... |
630
638
 
631
639
  ## 📄 许可证
632
640
 
@@ -634,16 +642,12 @@ MIT License - 与原版保持一致
634
642
 
635
643
  ## 🙏 致谢
636
644
 
637
- - **musistudio** - 原版项目作者
638
- - **社区贡献者** - 测试和反馈
639
- - **GLM团队** - 提供优质模型支持
645
+ - **musistudio** - 原版项目作者
640
646
 
641
647
  ---
642
648
 
643
649
  <div align="center">
644
-
645
- **[⬆ 回到顶部](#claude-code-router-cli-v20)**
646
-
650
+
647
651
  [🐛 报告问题](https://github.com/dedenlabs/claude-code-router-cli/issues) •
648
652
  [💡 功能建议](https://github.com/dedenlabs/claude-code-router-cli/issues) •
649
653
  [📖 完整文档](./docs/UNIFIED_ROUTER_GUIDE.md)
package/dist/cli.js CHANGED
@@ -58274,7 +58274,7 @@ var require_package3 = __commonJS({
58274
58274
  "package.json"(exports2, module2) {
58275
58275
  module2.exports = {
58276
58276
  name: "@dedenlabs/claude-code-router-cli",
58277
- version: "2.0.1",
58277
+ version: "2.0.2",
58278
58278
  description: "\u57FA\u4E8E@musistudio/claude-code-router\u7684\u589E\u5F3A\u7248CLI\u8DEF\u7531\u5DE5\u5177 - \u652F\u6301\u7EDF\u4E00\u8DEF\u7531\u5F15\u64CE\u3001\u5916\u90E8\u89C4\u5219\u52A0\u8F7D\u3001\u667A\u80FD\u65E5\u5FD7\u7CFB\u7EDF\u3001\u81EA\u52A8\u914D\u7F6E\u8FC1\u79FB\u548CGLM\u601D\u8003\u6A21\u5F0F",
58279
58279
  bin: {
58280
58280
  ccr: "dist/cli.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedenlabs/claude-code-router-cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "基于@musistudio/claude-code-router的增强版CLI路由工具 - 支持统一路由引擎、外部规则加载、智能日志系统、自动配置迁移和GLM思考模式",
5
5
  "bin": {
6
6
  "ccr": "dist/cli.js"