Claude Code Installation Guide (Windows)
A complete guide to installing Claude Code on Windows 10/11 using PowerShell. Learn how to configure your environment to use APIBox for unblocked access.
One: Overview
Installing Claude Code on Windows requires Git and Node.js. By setting environment variables in PowerShell, we can point the official npm package directly to APIBox, bypassing regional blocks and saving roughly 85% compared to official pricing.
Two: Prerequisites
Before you start, make sure you have installed:
- Git for Windows
- Download from git-scm.com/downloads/win and install with default settings.
- Node.js LTS
- Download the latest LTS installer from nodejs.org and install with default settings.
Three: Installation Steps
1. Verify Environment
Open Windows PowerShell and run these commands to ensure everything is installed:
node -v
npm -v
git --versionIf you see a “No suitable shell found” error later, it means Git Bash isn’t in your PATH. You’ll need to add CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe to your system environment variables.
2. Uninstall Old Versions (Optional)
If you’ve installed Claude Code before, clean it up:
npm uninstall -g @anthropic-ai/claude-code3. Install Claude Code
Install the package globally via npm:
npm install -g @anthropic-ai/claude-code4. Configure API Keys
Go to the APIBox Console to create your API Key.
In PowerShell, run the following to set temporary environment variables (for the current session):
$env:ANTHROPIC_BASE_URL="https://api.apibox.cc/v1"
$env:ANTHROPIC_AUTH_TOKEN="your_APIBox_Key"For permanent configuration: Right-click This PC -> Properties -> Advanced system settings -> Environment Variables, and add the two variables under your “User variables”.
Important: The variable must be named
ANTHROPIC_AUTH_TOKEN. If you name itAPI_KEY, Claude Code will launch your browser and ask you to log in.
5. Verify Installation
In PowerShell, run:
claudeIf the CLI launches successfully without opening a browser window, you’re good to go!
Four: Troubleshooting
❌ It opens a browser login window
Cause: The environment variables are missing or misnamed. Fix: Ensure you used ANTHROPIC_AUTH_TOKEN. If you added it to System Settings, you must restart PowerShell for changes to take effect.
❌ Error: “No suitable shell found”
Cause: Claude Code requires a Bash environment, which isn’t native to Windows. Fix: Install Git for Windows, then add a new System Environment Variable named CLAUDE_CODE_GIT_BASH_PATH with the value C:\Program Files\Git\bin\bash.exe.
❌ Sudden crashes or hangs
Cause: npm cache corruption or version mismatch. Fix: Clean the cache and reinstall:
npm cache clean --force
npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-codeTry it now, add support after registration and send your account ID to claim ¥10 trial credit
Sign up free →