Install Claude Code
Prerequisites
Before you begin, make sure your environment meets these requirements:
- Node.js 18+ (Node.js 22 LTS recommended)
- npm 9+ or pnpm 9+
- Operating system: macOS, Linux, or Windows WSL2
- Terminal: Any terminal emulator with ANSI color support
Check your Node.js version:
node --version # Should output v18.x.x or higher
If you don't have Node.js installed, use nvm to manage versions:
# Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # Install Node.js 22 LTS nvm install 22 nvm use 22
Install Claude Code
Install globally with npm:
npm install -g @anthropic-ai/claude-code
Or with pnpm:
pnpm add -g @anthropic-ai/claude-code
Verify the installation:
claude --version
You should see a version number like 1.x.x.
Get Your Chuizi.AI API Key
- Go to app.chuizi.ai and create an account
- Navigate to the API Keys page
- Click Create Key and enter a recognizable name (e.g., "claude-code")
- Copy the generated key (starts with
ck-)
The key is shown only once. Store it securely. If you lose it, create a new one.
Verify the Installation
Set temporary environment variables and launch Claude Code:
ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic \ ANTHROPIC_API_KEY=ck-your-key-here \ claude
If everything is working, you'll see the Claude Code interactive interface. Send a simple message to test connectivity:
> Hello, what's today's date?
A successful response means the installation is complete. You can also check the request log at app.chuizi.ai to confirm the request went through.
Update Claude Code
Claude Code is updated frequently. Keep it current:
npm update -g @anthropic-ai/claude-code
Check the current version:
claude --version
Uninstall
To remove Claude Code:
npm uninstall -g @anthropic-ai/claude-code
Next Steps
After installation, follow the Configuration Guide to make Chuizi.AI your default API endpoint so you don't need to set environment variables manually each time.