ClaudeCode Installation Guide
Claude Code Windows Official Package Installation Guide
Installation Steps
1. [Desktop Step] Download Git
Visit https://git-scm.com/downloads/win, click Next for all installation steps, do not modify paths
2. [Desktop Step] Download Node.js
Visit https://nodejs.org/zh-cn/download, click Next for all installation steps, do not modify paths
3. [Windows PowerShell Step] Verify Installation
Open Windows PowerShell (blue icon), execute the following commands to verify installation:
4. [Windows PowerShell Step] Uninstall Existing Claude Code (skip if not installed)
5. [Windows PowerShell Step] Install Official Package
6. [Control Panel Step] Set Windows System Environment Variables
The following three environment variables need to be set:
Variable Name: ANTHROPIC_BASE_URL | https://claudecode.epiphanymind.com/api/claudecode |
Variable Name: ANTHROPIC_API_KEY | Your API Key |
Variable Name: ANTHROPIC_AUTH_TOKEN | Your API Key |
For setup method, see "Prerequisites: Modifying Environment Variables" above
7. [Windows PowerShell Step] Restart Windows PowerShell, Verify Installation
After restarting Windows PowerShell, run the following command to confirm successful installation
After installation is complete, you can start using Claude Code in any project directory:
Common Issues
Issue 1: Unable to connect to Anthropic services

Issue 2: 401 Invalid token

1. Backup the "C:\users\your-username\.claude.json" file
2. Delete the "C:\users\your-username\.claude.json" file
3. Reopen Claude Code and select "yes" in the "yes/no(recommended)" dialog that appears
If Issue 1 persists after the above steps, execute the following:
Modify the "C:\users\your-username\.claude.json" file and add "hasCompletedOnboarding": true to the outermost JSON
macOS/Linux Official Package Installation Guide
Installation Steps
1. Open Terminal
Use Cmd+Space to search for "Terminal" or find Terminal in Applications > Utilities
2. Uninstall Existing Claude Code (skip if not installed)
3. Install Official Package
4. Create API Key in K2Sonnet Developer Center
Login to K2Sonnet Developer Center -> API Key Management -> Create API Key
5. Configure Environment Variables
Execute in terminal
After installation is complete, you can start using Claude Code in any project directory: