A Node.js package that provides default configuration for claude-code-router with DashScope support.
中文文档 | English
- Node.js >= 14.0.0
- DashScope API Key (get one from Alibaba Cloud Model Studio)
Option 1: Environment Variable (Recommended)
export DASHSCOPE_API_KEY="your-api-key-here"
Option 2: You can also configure manually after setup (see Configuration section)
First, install the required dependencies:
# 1. Install claude-code
npm install -g @anthropic-ai/claude-code
# 2. Install claude-code-router
npm install -g @musistudio/claude-code-router
Then choose one of the following installation methods for the configuration package:
Option 1: Install from npm registry (Recommended)
npm install -g @dashscope-js/claude-code-config
Option 2: Install from source code
# Clone the repository
git clone https://github.com/dashscope/claude-code-config.git
cd claude-code-config
# Install dependencies and install globally
npm install
npm install -g .
ccr-dashscope
ccr code
This tool supports bilingual Chinese/English and automatically selects based on system language:
- Chinese environment (
LANG
containszh
): Displays Chinese prompts - Other environments: Displays English prompts
Default configuration directory: ~/.claude-code-router/
- Main configuration file:
~/.claude-code-router/config.json
- Plugins directory:
~/.claude-code-router/plugins/
Running ccr-dashscope
will automatically generate the above directories and files.
If you didn't set the environment variable before running ccr-dashscope
, you can manually edit the configuration file:
-
Navigate to the configuration directory:
cd ~/.claude-code-router
-
Edit the configuration file:
# On macOS/Linux nano config.json # or use your preferred editor
-
Replace the
"api_key"
field with your actual DashScope API Key
qwen3-235b-a22b
- Default model with long context and streaming support
- API Key not working: Ensure your DashScope API Key is valid and has sufficient quota
- Command not found: Make sure all packages are installed globally with
-g
flag - Permission issues: You may need to run with
sudo
on some systems for global installation
- Check the Alibaba ModelStudio Documentation
- 🌐 Automatic multilingual support (Chinese/English)
- 🔧 One-click DashScope integration setup
- 🚀 Streaming response support
- 📝 Intelligent request transformation
- 🔑 Flexible API Key configuration methods
Apache-2.0