@musistudio/claude-code-router 1.0.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/.dockerignore ADDED
@@ -0,0 +1,2 @@
1
+ node_modules
2
+ npm-debug.log
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # Claude Code Router
2
+
3
+ > This is a repository for testing routing Claude Code requests to different models.
4
+
5
+ ## Usage
6
+
7
+ 1. Install Claude Code
8
+
9
+ ```shell
10
+ npm install -g @anthropic-ai/claude-code
11
+ ```
12
+
13
+ 2. Install Claude Code Router
14
+
15
+ ```shell
16
+ npm install -g @musistudio/claude-code-router
17
+ ```
18
+
19
+ 3. Start Claude Code by claude-code-router
20
+
21
+ ```shell
22
+ ccr code
23
+ ```
24
+
25
+
26
+ ## Plugin
27
+
28
+ The plugin allows users to rewrite Claude Code prompt and custom router. The plugin path is in `$HOME/.claude-code-router/plugins`. Currently, there are two demos available:
29
+ 1. [custom router](https://github.com/musistudio/claude-code-router/blob/dev/custom-prompt/plugins/deepseek.js)
30
+ 2. [rewrite prompt](https://github.com/musistudio/claude-code-router/blob/dev/custom-prompt/plugins/gemini.js)
31
+
32
+ You need to move them to the `$HOME/.claude-code-router/plugins` directory and configure 'usePlugin' in `$HOME/.claude-code-router/config.json`,like this:
33
+
34
+ ```json
35
+ {
36
+ "usePlugin": "gemini",
37
+ "LOG": true,
38
+ "OPENAI_API_KEY": "",
39
+ "OPENAI_BASE_URL": "",
40
+ "OPENAI_MODEL": ""
41
+ }
42
+ ```
43
+
44
+ ## Features
45
+ - [x] Plugins
46
+ - [ ] Support change models
47
+ - [ ] Suport scheduled tasks
package/config.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "usePlugin": "",
3
+ "LOG": true,
4
+ "OPENAI_API_KEY": "",
5
+ "OPENAI_BASE_URL": "",
6
+ "OPENAI_MODEL": ""
7
+ }