Tutorial

Get started in three steps: install → one-click config → verify.

Illustrated guide ↗
No API token found yet. Create one on the API Tokens page, then replace your-token in the commands with it.
STEP 1 · Install
Terminal
# Official installer (recommended)
curl -fsSL https://claude.ai/install.sh | bash
 
# Or use Homebrew
brew install --cask claude-code
 
# Or use npm (requires Node.js 22+, no sudo)
npm install -g @anthropic-ai/claude-code
STEP 2 · Configure

Use the one-click setup script. It writes the environment variables and config files and backs up your existing config:

Terminal
curl -fsSL https://aicoding.inc/sh/claude-code-setup-obfuscated.sh | bash -s "your-token"

The script writes to ~/.zshrc / ~/.bashrc (config.fish for fish). Run source or reopen the terminal afterwards.

Manual configuration (optional)
Terminal
# Append to ~/.zshrc or ~/.bashrc, then source it or reopen the terminal
export ANTHROPIC_BASE_URL="https://api.aicoding.inc"
export ANTHROPIC_AUTH_TOKEN="your-token"

Use ANTHROPIC_AUTH_TOKEN and don't also set ANTHROPIC_API_KEY, or you'll get an Auth conflict. Don't append /v1 to the base URL.

STEP 3 · Verify
Terminal
# Check the version; a version number means it's installed
claude --version
 
# Start inside your project directory
claude

Send any message after starting. A normal reply means it works, and the request also shows up in Console → Request Logs.

FAQ
Auth conflict or 401
  • Check whether ANTHROPIC_API_KEY is also set; remove it and keep only ANTHROPIC_AUTH_TOKEN
  • Make sure the token hasn't been deleted or disabled and your balance is sufficient
  • Reopen the terminal after changing config; existing sessions keep the old variables
Still asked to log in to an Anthropic account
  • The environment variables haven't taken effect; reopen the terminal and start claude again
  • Run echo $ANTHROPIC_BASE_URL and confirm it prints https://api.aicoding.inc
command not found: claude
  • The official installer uses ~/.local/bin; make sure it's on your PATH
  • Reopen the terminal, or run claude doctor for diagnostics