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 higher installed on your computer.

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

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

If you encounter permission issues:

sudo npm install -g @anthropic-ai/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

Next Steps

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

  1. Check out Quick Start to learn basic usage
  2. Learn about Environment Variables for customization
  3. Explore Usage Tips to boost efficiency