1-minute quick configuration
302cc - A CLI tool to quickly configure Claude Code with the 302.AI APIEnter the following command in any terminal:
Table of Contents#
Quick Start#
Method 1: Run directly with npx (Recommended)#
If Node.js (v18+) is already installed on your device, simply run the following command in your terminal/command line:No installation is required for this method—use it instantly.Method 2: Install Globally#
For frequent use, install the tool globally:
Install Node.js#
302cc requires Node.js v18.0.0 or a higher version.Check for Existing Installation#
Open your terminal/command line and enter:If the output shows v18.x.x or a higher version, Node.js is already installed and you can use 302cc directly.If the prompt shows "command not found" or the version is lower than 18, follow the steps below to install it.Install Node.js on Windows#
Method 1: Download from Official Website (Recommended for Beginners)2.
Click to download the LTS version (Long-Term Support)
3.
Run the downloaded installer and click "Next" through all steps
4.
Restart your Command Prompt after installation
5.
Enter node -v to verify the installation
Method 2: Use winget (Windows 10/11)winget install OpenJS.NodeJS.LTS
Install Node.js on macOS#
Method 1: Download from Official Website2.
Download the LTS installer for macOS
3.
Double-click the installer to run it
Method 2: Use Homebrew (Recommended)Method 3: Use nvm (Recommended for Developers)Install Node.js on Linux#
Usage#
First-Time Use#
After running npx 302cc, you will enter the guided setup process:1.
Select Language - Chinese / English
2.
Enter API Key - Input your 302.AI API Key
3.
Select Model - Choose the AI model to use
4.
Select Node - International Node / Chinese Mainland Node
5.
Confirm Application - Apply the configuration to Claude Code
Subsequent Use#
Once configured, running the command again will open the main menu:1. Configure API Key - Set or update your API Key
2. Configure API Node - Switch between International/Chinese Mainland Node
3. Configure Model - Select the AI model
4. Configure Interface Language - Switch between Chinese/English
5. Clear Current Configuration - Reset all settings
6. Apply Configuration and Exit - Save settings to Claude Code
7. Exit Directly - Quit the program
FAQs#
1. Prompt shows "npx: command not found"#
Cause: Node.js is not installed or the installation is incomplete.Restart your terminal/command prompt after installation.
2. Prompt shows "node: command not found"#
Cause: Node.js is not installed correctly or not added to the system PATH.Windows: Rerun the Node.js installer and ensure "Add to PATH" is checked.
macOS/Linux: Restart your terminal or run source ~/.bashrc.
3. Permission Error (EACCES: permission denied)#
Right-click Command Prompt or PowerShell
Select "Run as administrator"
Execute the command again
4. Network Error / Download Timeout#
Cause: Network connection issues or proxy requirements.Solution 1: Use a Chinese Mainland npm mirrorSolution 2: Configure a proxy(Replace 127.0.0.1:7890 with your actual proxy address)5. Prompt shows Node.js version is too low#
Solution: Upgrade Node.js to v18 or a higher version.6. Windows prompt shows "cannot load file... because running scripts is disabled on this system"#
Cause: PowerShell execution policy restrictions.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
7. Claude Code does not take effect after configuration#
1.
Ensure you select "Apply Configuration and Exit" in 302cc.
2.
Fully close and restart Claude Code.
3.
Check if Claude Code is installed correctly.
OS-Specific Guides#
Windows#
Press Win + R, enter cmd, and press Enter.
Or search for "Command Prompt" / "PowerShell".
macOS#
Press Cmd + Space, enter "Terminal", and press Enter.
Or find "Terminal" in Applications → Utilities.
Linux#
Or find "Terminal" in the application menu.
Get Help#
For other issues, please visit:
API Node Description#
| Node | Address | Applicable Scenario |
|---|
| International Node | api.302.ai | Overseas users |
| Chinese Mainland Node | api.302ai.cn | Users in the Chinese mainland |
It is recommended that users in the Chinese mainland select the Chinese Mainland Node for a better connection speed. Modified at 2026-01-25 03:59:29