Skip to content

Claude Code CLI Setup Guide

1. Open the config directory

Claude Code's config directory is .claude, located in your home directory. Open it according to your OS:

text
Press Win + R, enter the following and hit Enter:

%userprofile%\.claude
bash
# Option 1: open directly from the terminal
open ~/.claude

# Option 2: in Finder press Cmd + Shift + G, enter ~/.claude and hit Enter
bash
# Enter the config directory in a terminal
cd ~/.claude

# To open in a file manager (GNOME example)
xdg-open ~/.claude

You'll see the directory contents. If there's no settings.json, create it manually and open it.

TIP

If the .claude directory doesn't exist yet, run claude once in the terminal to auto-generate it, or create the directory manually.

2. Edit settings.json

settings.json is the core config file — used to configure the API URL, key, and features like MCP, Skills, and Hooks.

Write the following into settings.json:

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://www.cctq.ai",
    "ANTHROPIC_AUTH_TOKEN": "xxx",
    "CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}
  • ANTHROPIC_BASE_URL: the relay request URL — set it to https://www.cctq.ai.
  • ANTHROPIC_AUTH_TOKEN: your token — replace xxx with your actual key.

Save, reopen the terminal, and run claude to start.