Skip to content

Claude Code Setup Guide ​

Install Claude Code ​

Use the same npm command on Windows, macOS, and Linux:

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

Verify:

bash
claude -v

If a version number is printed, installation succeeded.

Configure API ​

CC-Switch is recommended for channel management. If you need manual configuration, set the following environment variables.

Windows ​

Open PowerShell as administrator:

powershell
setx ANTHROPIC_BASE_URL "https://api.mioufun.top"
setx ANTHROPIC_AUTH_TOKEN "your-key"

Close and reopen the terminal, then verify:

powershell
echo $env:ANTHROPIC_BASE_URL
echo $env:ANTHROPIC_AUTH_TOKEN

macOS / Linux ​

zsh users edit ~/.zshrc; bash users edit ~/.bashrc:

bash
export ANTHROPIC_BASE_URL="https://api.mioufun.top"
export ANTHROPIC_AUTH_TOKEN="your-key"

Apply the configuration:

bash
source ~/.zshrc

Start Using ​

Enter your project directory and start:

bash
cd your-project-directory
claude

After the input box appears, describe what you want to do.

Common commands:

  • /help: show commands.
  • /clear: clear the current session.
  • /exit: exit.