Tutorial
Claude Code Intro
Claude Code is Anthropic's official CLI tool that lets Claude write and run code on your machine.
💡 Tip:For detailed tutorials, see documentation
1Install Claude Code
Choose the installation method for your OS:
# macOS Install (Homebrew recommended)brew install anthropics/claude/claude# Or use the official install scriptcurl -fsSL https://claude.ai/install.sh | sh2Configure API
After installation, configure your API key. Recommended: use the one-click config script:
Run the following in 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)
# Settings API basic URLexport ANTHROPIC_BASE_URL="https://api.aicoding.inc"# Settings API keyexport ANTHROPIC_API_KEY="your-api-key-here"# verifyclaude --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:
# checkVersionclaude --version# testconnectclaude "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