Claude Code

Claude Code is Anthropic's official CLI agent. It reads ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL from the environment, making it trivial to point at any compatible endpoint.

Quick Install (Recommended)

The fastest way to get started — copy a single command from the API Keys page that installs Claude Code and configures your key automatically:

  1. Go to the API Keys page and create a new key (or open an existing key's settings)
  2. In the "Install Claude Code" section, choose your platform (Windows or macOS/Linux)
  3. Click the copy button and paste the command into your terminal
Windows (PowerShell)
irm 'https://cheapai.cc/docs/install/claudecode.ps1?key=sk-ar-YOUR_KEY' | iex
macOS / Linux
curl -fsSL 'https://cheapai.cc/docs/install/claudecode.sh?key=sk-ar-YOUR_KEY' | bash
The command installs Claude Code via npm and writes your API key + base URL to ~/.claude/settings.json — no manual configuration needed.

Manual Setup

If you prefer to configure Claude Code manually, follow these steps:

Install Claude Code

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

macOS / Linux Configuration

Export the environment variables before running claude:

export ANTHROPIC_API_KEY=sk-ar-YOUR_KEY_HERE
export ANTHROPIC_BASE_URL=https://api.cheapai.cc

Windows Configuration

set ANTHROPIC_API_KEY=sk-ar-YOUR_KEY_HERE
set ANTHROPIC_BASE_URL=https://api.cheapai.cc

Usage

After setting the environment variables, use Claude Code as normal:

# Start interactive session
claude

# Run one-shot command
claude -p "Explain this file" src/main.py

# Review a pull request
claude review