Tutorial

Claude Code Intro

Claude Code is Anthropic's official CLI tool that lets Claude write and run code on your machine.

💡 TipFor detailed tutorials, see documentation

1Install Claude Code

Choose the installation method for your OS:

Terminal
# macOS Install (Homebrew recommended)
brew install anthropics/claude/claude
# Or use the official install script
curl -fsSL https://claude.ai/install.sh | sh

2Configure API

After installation, configure your API key. Recommended: use the one-click config script:

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

💡 Please replace your-token with your API Token

💡 The script will automatically configure environment variables in ~/.bashrc or ~/.zshrc

Manual configuration (optional)
Terminal
# Settings API basic URL
export ANTHROPIC_BASE_URL="https://api.aicoding.inc"
# Settings API key
export ANTHROPIC_API_KEY="your-api-key-here"
# verify
claude --version

💡 It is recommended to add these environment variables to ~/.bashrc or ~/.zshrc

3Verify Installation

Run the following commands to verify the installation was successful:

Terminal
# checkVersion
claude --version
# testconnect
claude "Hello, Claude!"

FAQ

Cannot connect to API

Check that ANTHROPIC_BASE_URL is correct

Confirm network connection is working

Verify that the API key is valid

Command not found

Confirm Claude Code is installed correctly

Check PATH environment variable

Try reopening the terminal