Files
claude-code-router/README.md
jinhui.li 2cc91ada5c add cli
2025-06-10 12:55:25 +08:00

47 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Claude Code Router
> This is a repository for testing routing Claude Code requests to different models.
## Usage
1. Install Claude Code
```shell
npm install -g @anthropic-ai/claude-code
```
2. Install Claude Code Router
```shell
npm install -g @musistudio/claude-code-router
```
3. Start Claude Code by claude-code-router
```shell
ccr code
```
## Plugin
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:
1. [custom router](https://github.com/musistudio/claude-code-router/blob/dev/custom-prompt/plugins/deepseek.js)
2. [rewrite prompt](https://github.com/musistudio/claude-code-router/blob/dev/custom-prompt/plugins/gemini.js)
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:
```json
{
"usePlugin": "gemini",
"LOG": true,
"OPENAI_API_KEY": "",
"OPENAI_BASE_URL": "",
"OPENAI_MODEL": ""
}
```
## Features
- [x] Plugins
- [] Support change models
- [] Suport scheduled tasks