@halilertekin/claude-code-router-config 1.1.1 ā 1.2.0
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.
- package/README.md +6 -0
- package/cli/analytics.js +4 -3
- package/cli/commands.js +2 -1
- package/package.json +2 -2
- package/plugins/plugin-manager.js +2 -1
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ ccr config template balanced # Best of all worlds
|
|
|
38
38
|
|
|
39
39
|
## Features
|
|
40
40
|
|
|
41
|
+
- **Node.js 16+ Support**: Compatible with modern Node.js environments
|
|
41
42
|
- **7 Provider Support**: OpenAI, Anthropic, Gemini, Qwen, GLM, OpenRouter, GitHub Copilot
|
|
42
43
|
- **Smart Intent-Based Routing**: Automatically selects the best model based on your request
|
|
43
44
|
- **Advanced CLI Tools**: Test, benchmark, analyze, and monitor your setup
|
|
@@ -58,6 +59,11 @@ ccr config template balanced # Best of all worlds
|
|
|
58
59
|
| Complex algorithms | OpenAI | o1 |
|
|
59
60
|
| Coding assistance | GitHub Copilot | copilot |
|
|
60
61
|
|
|
62
|
+
## Requirements
|
|
63
|
+
|
|
64
|
+
- **Node.js**: >= 16.0.0
|
|
65
|
+
- **Package Manager**: pnpm (preferred) or npm
|
|
66
|
+
|
|
61
67
|
## Installation
|
|
62
68
|
|
|
63
69
|
### Option 1: Homebrew (Recommended)
|
package/cli/analytics.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
-
|
|
5
|
+
let chalk = require('chalk');
|
|
6
|
+
if (chalk.default) chalk = chalk.default;
|
|
6
7
|
const os = require('os');
|
|
7
8
|
|
|
8
9
|
// Analytics storage path
|
|
@@ -404,7 +405,7 @@ function displayAnalytics(period = 'today', options = {}) {
|
|
|
404
405
|
if (detailed && Object.keys(summary.providers).length > 0) {
|
|
405
406
|
console.log(chalk.yellow('\nš Provider Breakdown:'));
|
|
406
407
|
const sortedProviders = Object.entries(summary.providers)
|
|
407
|
-
.sort(([,a], [,b]) => b - a);
|
|
408
|
+
.sort(([, a], [, b]) => b - a);
|
|
408
409
|
|
|
409
410
|
sortedProviders.forEach(([provider, count]) => {
|
|
410
411
|
const percentage = ((count / summary.totalRequests) * 100).toFixed(1);
|
|
@@ -415,7 +416,7 @@ function displayAnalytics(period = 'today', options = {}) {
|
|
|
415
416
|
if (detailed && Object.keys(summary.models).length > 0) {
|
|
416
417
|
console.log(chalk.yellow('\nš¤ Model Breakdown:'));
|
|
417
418
|
const sortedModels = Object.entries(summary.models)
|
|
418
|
-
.sort(([,a], [,b]) => b - a)
|
|
419
|
+
.sort(([, a], [, b]) => b - a)
|
|
419
420
|
.slice(0, 10); // Top 10 models
|
|
420
421
|
|
|
421
422
|
sortedModels.forEach(([model, count]) => {
|
package/cli/commands.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { spawn } = require('child_process');
|
|
6
|
-
|
|
6
|
+
let chalk = require('chalk');
|
|
7
|
+
if (chalk.default) chalk = chalk.default;
|
|
7
8
|
const configPath = path.join(require('os').homedir(), '.claude-code-router');
|
|
8
9
|
|
|
9
10
|
// Load config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@halilertekin/claude-code-router-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Multi-provider configuration for Claude Code Router with intent-based routing, advanced CLI tools, analytics, and smart routing. Setup OpenAI, Anthropic, Gemini, Qwen, GLM, OpenRouter, and GitHub Copilot with intelligent routing.",
|
|
5
5
|
"main": "install.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"install": "node install.js",
|
|
15
15
|
"setup": "chmod +x install.sh && ./install.sh",
|
|
16
16
|
"postinstall": "node postinstall.js",
|
|
17
|
-
"test": "
|
|
17
|
+
"test": "jest",
|
|
18
18
|
"cli": "node cli/commands.js",
|
|
19
19
|
"benchmark": "node cli/benchmark.js",
|
|
20
20
|
"analytics": "node cli/analytics.js",
|