Claude Code Deployment Guide
Complete deployment guide for Anthropic's AI programming assistant
Prerequisites
Please complete the Node.js environment installation first, ensuring Node.js 18+ is properly installed.
Quick Configuration with CC-Switch (Recommended)
Prerequisite
Before configuring Claude Code with CC-Switch, ensure you have globally installed the Claude Code tool via npm:
npm install -g @anthropic-ai/claude-codeVerify installation: claude --version
If you have installed the CC-Switch configuration tool, you can easily manage Claude Code configurations through a graphical interface without manually editing configuration files and environment variables.
CC-Switch Advantages
- Graphical interface, simple and intuitive operation
- One-click switching between different provider configurations
- Automatic management of environment variables and configuration files
- Configuration backup and restore support
- No need to restart the terminal to switch configurations
Configuration Steps
Launch CC-Switch and Add Claude Code Configuration
- Open the CC-Switch application
- Click the "Claude" tab at the top
- Click the orange "+" button in the upper right corner to add a new configuration
Fill in Provider Configuration
- Provider Name: Custom name (e.g., "元渊智能")
- API Base URL: Enter
https://api.ai.soraliststudio.com - API Key: Paste your Claude-specific token obtained from the 元渊智能 platform
- Model Selection: Choose available Claude models based on your needs
- Click "Save"
- You can add multiple different provider configurations (e.g., official, 元渊智能, etc.)
- CC-Switch will automatically modify the
~/.claude/settings.jsonconfiguration file - After switching configurations, close and restart Claude Code for changes to take effect
Enable Configuration
- Find the "元渊智能" configuration you just created in the configuration list
- Click the "Currently Used" button on the right side of the configuration (or click the configuration card directly)
- The configuration will be marked as "Currently Used" (green label)
- Restart Claude Code for the new configuration to take effect
System Tray Quick Switch
CC-Switch supports quick configuration switching via the system tray:
- Right-click the CC-Switch icon in the system tray
- Select the Claude category from the menu
- Directly select the configuration to switch to
- Configuration takes effect immediately without opening the main interface
- Ensure you create a Claude Code-specific token from the 元渊智能 platform
- You need to restart Claude Code after switching configurations
- You can test API endpoint speed in CC-Switch to choose the optimal configuration
Manual Command Line Configuration
If you don't use CC-Switch, you can manually configure Claude Code via the command line.
System Requirements
Windows 10, 11
Installation Steps
Method 1: Native Install (Recommended)
Using PowerShell:
irm https://claude.ai/install.ps1 | iexUsing CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdMethod 2: NPM Installation
npm install -g @anthropic-ai/claude-codeVerify installation:
claude --versionConfigure Environment Variables
For PowerShell:
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-xxx", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.ai.soraliststudio.com", "User")For CMD:
setx ANTHROPIC_AUTH_TOKEN "sk-xxx"
setx ANTHROPIC_BASE_URL "https://api.ai.soraliststudio.com"Please replace sk-xxx with your own API key! After setting up, restart the terminal for the environment variables to take effect.
Launch Claude
Navigate to your project directory in the terminal and enter claude to start using it.
System Requirements
macOS 10.15 (Catalina) or higher
Installation Steps
Method 1: Homebrew (Recommended)
brew install --cask claude-codeMethod 2: Curl Script
curl -fsSL https://claude.ai/install.sh | bashMethod 3: NPM Installation
npm install -g @anthropic-ai/claude-codeVerify installation:
claude -vConfigure Environment Variables
echo 'export ANTHROPIC_AUTH_TOKEN="sk-xxx"' >> ~/.bash_profile
echo 'export ANTHROPIC_BASE_URL="https://api.ai.soraliststudio.com"' >> ~/.bash_profile
source ~/.bash_profilePlease replace sk-xxx with your own API key!
Restart Terminal and Launch Claude
After restarting the terminal, navigate to your project directory and enter claude to start using it.
System Requirements
Linux distributions (Ubuntu 18.04+, CentOS 7+, Debian 9+, etc.)
Installation Steps
Method 1: Curl Script (Recommended)
curl -fsSL https://claude.ai/install.sh | bashMethod 2: NPM Installation
npm install -g @anthropic-ai/claude-codeVerify installation:
claude -vConfigure Environment Variables
Ubuntu/Debian (Bash):
echo 'export ANTHROPIC_AUTH_TOKEN="sk-xxx"' >> ~/.bash_profile
echo 'export ANTHROPIC_BASE_URL="https://api.ai.soraliststudio.com"' >> ~/.bash_profile
source ~/.bash_profileFedora/CentOS (Zsh):
echo 'export ANTHROPIC_AUTH_TOKEN="sk-xxx"' >> ~/.zshrc
echo 'export ANTHROPIC_BASE_URL="https://api.ai.soraliststudio.com"' >> ~/.zshrc
source ~/.zshrcPlease replace sk-xxx with your own API key!
Restart Terminal and Launch Claude
After restarting the terminal, navigate to your project directory and enter claude to start using it.
FAQ
Command Not Found?
- Confirm Claude Code is properly installed
- Check PATH environment variable
- Restart the terminal window
Connection Failed?
- Check network connection
- Confirm API Key is correct
- Check if balance is sufficient
How is this guide?