Key and group selection

Choose a Claude group in key management. Claude Max(仅限CC) permits only Claude Code and Claude Desktop. TRAE, OpenClaw, Hermes and scripts require Claude Max(外接版), Claude Plus(精品) or a suitable official direct group. The current Plus listing includes claude-opus-4-8, used below. Check IDs separately for other groups, including dated Haiku variants. See live pricing.

Install on Windows, macOS and Linux

Prepare Node.js, then run in your terminal:

On Windows, provide Git for Windows when required by your client release. Use WSL if the native environment is unsupported. On macOS and Linux, use a normal user's npm installation and fix its location if permissions fail.

Windows

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

macOS

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

Linux

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

Set variables for the current session

Anthropic uses the root base URL: do not append /v1/messages to the base. Windows PowerShell:

powershell
$env:ANTHROPIC_BASE_URL = "https://monkeytheme.com"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
$env:ANTHROPIC_MODEL = "claude-opus-4-8"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
claude

In Windows CMD, use set ANTHROPIC_BASE_URL=https://monkeytheme.com, set ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY, set ANTHROPIC_MODEL=claude-opus-4-8 and set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1, then run claude.

macOS / Linux:

bash
export ANTHROPIC_BASE_URL="https://monkeytheme.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="claude-opus-4-8"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
claude

Launch inside the intended project. Replace the placeholder privately and avoid shared terminal history. Keep the nonessential-traffic switch at 1; it does not disable all networking.

Persist settings and switch models

Session variables affect only that terminal and its children. On Windows, use the user environment variable editor for the same names. On macOS zsh, edit ~/.zshrc; on Linux bash, edit ~/.bashrc with the corresponding exports. Restrict access to files containing keys and keep them out of Git, or enter the key privately each session instead. Open a new terminal afterward. When changing groups, recheck the model and restart Claude Code; remove conflicting authentication variables from earlier providers.

Verification and troubleshooting

Launching proves installation only. After checking the URL and model, a short request can verify access and may cost money. Check the token for 401, group restrictions for 403, root URL for 404, and exact ID for model_not_found. An unexpected official login flow may indicate an older authentication setting overriding yours. Do not share keys or complete session logs. Continue to Gemini CLI or TRAE SOLO.