Installation

Install and configure Claude Code on Windows, macOS, and Linux

Installation

Follow this guide to easily install and use Claude Code on your computer. The entire process takes just 5 minutes.

Prerequisites

Claude Code requires Node.js to run. Please ensure you have Node.js 18.0 or above installed on your computer (22 LTS recommended).

Windows

Step 1: Install Node.js

  1. Open your browser and visit https://nodejs.org/

  2. Click the "LTS" version download (recommended Long Term Support version)

  3. Double-click the downloaded .msi file

  4. Follow the installation wizard using default settings

Option B: Using Package Manager

If you have Chocolatey or Scoop installed:

# Using Chocolatey
choco install nodejs

# Or using Scoop
scoop install nodejs
Verify Installation
node --version
npm --version

Step 2: Install Claude Code

Open PowerShell or CMD:

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

Verify installation:

claude --version

Step 3: Set Environment Variables

Temporary (Current Session)
$env:ANTHROPIC_BASE_URL = "https://asia.qcode.cc/api"
$env:ANTHROPIC_AUTH_TOKEN = "your-api-key"
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://asia.qcode.cc/api", [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "your-api-key", [System.EnvironmentVariableTarget]::User)

Replace your-api-key with your actual key from QCode.cc Dashboard.

Step 4: Start Using

cd C:\path\to\your\project
claude

macOS

Step 1: Install Node.js

brew update
brew install node
Option B: Official Download
  1. Visit https://nodejs.org/

  2. Download the macOS LTS version

  3. Open the downloaded .pkg file

  4. Follow the installation instructions

Verify Installation
node --version
npm --version

Step 2: Install Claude Code

Option A: Using npm
npm install -g @anthropic-ai/claude-code

If you encounter permission issues:

sudo npm install -g @anthropic-ai/claude-code
Option B: Using Homebrew
brew install --cask claude-code

Step 3: Set Environment Variables

# For zsh (macOS default)
echo 'export ANTHROPIC_BASE_URL="https://asia.qcode.cc/api"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="your-api-key"' >> ~/.zshrc
source ~/.zshrc

Step 4: Start Using

cd /path/to/your/project
claude

Linux / WSL2

Step 1: Install Node.js

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Option B: Using System Package Manager
# Ubuntu/Debian
sudo apt update
sudo apt install nodejs npm

# CentOS/RHEL/Fedora
sudo dnf install nodejs npm

Step 2: Install Claude Code

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

Step 3: Set Environment Variables

echo 'export ANTHROPIC_BASE_URL="https://asia.qcode.cc/api"' >> ~/.bashrc
echo 'export ANTHROPIC_AUTH_TOKEN="your-api-key"' >> ~/.bashrc
source ~/.bashrc

Step 4: Start Using

cd /path/to/your/project
claude

Advanced Configuration (Optional Environment Variables)

Beyond the two required variables, you can customize further with these optional variables:

ANTHROPIC_MODEL

Specify the default model to use (defaults to Sonnet 4.6 if not set):

# Use Sonnet 4.6 (default, recommended)
export ANTHROPIC_MODEL=claude-sonnet-4-6-20250929

# Use Opus 4.6 (most powerful, higher cost)
export ANTHROPIC_MODEL=claude-opus-4-6

MAX_THINKING_TOKENS

Control the maximum tokens for the model's thinking process (set to 0 to disable):

export MAX_THINKING_TOKENS=16000

CLAUDE_CODE_EFFORT_LEVEL

Adjust Claude's effort level:

# Options: low / medium / high
export CLAUDE_CODE_EFFORT_LEVEL=high

CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC

Disable non-essential network requests (e.g., telemetry):

export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Next Steps

Congratulations! You've successfully installed Claude Code. Next:

  1. Check out Quick Start to learn basic usage

  2. Explore CLI Tips to boost efficiency

πŸš€
Get Started with QCode β€” AI Coding Assistant
Official Claude Code relay, fast and reliable, ready to use
View Pricing Plans β†’ Create Account