元渊 API元渊 API
Deployment Guide

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.

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-code

Verify 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

  1. Open the CC-Switch application
  2. Click the "Claude" tab at the top
  3. Click the orange "+" button in the upper right corner to add a new configuration

Fill in Provider Configuration

  1. Provider Name: Custom name (e.g., "元渊智能")
  2. API Base URL: Enter https://api.ai.soraliststudio.com
  3. API Key: Paste your Claude-specific token obtained from the 元渊智能 platform
  4. Model Selection: Choose available Claude models based on your needs
  5. Click "Save"
  • You can add multiple different provider configurations (e.g., official, 元渊智能, etc.)
  • CC-Switch will automatically modify the ~/.claude/settings.json configuration file
  • After switching configurations, close and restart Claude Code for changes to take effect

Enable Configuration

  1. Find the "元渊智能" configuration you just created in the configuration list
  2. Click the "Currently Used" button on the right side of the configuration (or click the configuration card directly)
  3. The configuration will be marked as "Currently Used" (green label)
  4. 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 | iex

Using CMD:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Method 2: NPM Installation

npm install -g @anthropic-ai/claude-code

Verify installation:

claude --version

Configure 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-code

Method 2: Curl Script

curl -fsSL https://claude.ai/install.sh | bash

Method 3: NPM Installation

npm install -g @anthropic-ai/claude-code

Verify installation:

claude -v

Configure 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_profile

Please 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 | bash

Method 2: NPM Installation

npm install -g @anthropic-ai/claude-code

Verify installation:

claude -v

Configure 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_profile

Fedora/CentOS (Zsh):

echo 'export ANTHROPIC_AUTH_TOKEN="sk-xxx"' >> ~/.zshrc
echo 'export ANTHROPIC_BASE_URL="https://api.ai.soraliststudio.com"' >> ~/.zshrc
source ~/.zshrc

Please 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?