Claude Code CLI Configuration and Installation Method

Claude Code CLI Configuration and Installation Method

Updated on June 12

Step 1: Install Git for Windows First

To install Claude Code natively on Windows, you need to use Git Bash.

Git for Windows download address: Git for Windows official website

Download the version that matches your system and install it with the default options. Verification command:

Code block Bash
git --version

Step 2: Install Claude Code

After the environment is ready, you can officially install Claude Code:

Code block Plain Text
npm install -g @anthropic-ai/claude-code

Seeing the installation screen finish does not mean everything is ready. The next step is to check whether the command actually takes effect. After installation, run the version check again:

Code block Plain Text
claude --version

The image below shows the key verification step after installation. What matters is not whether the interface looks good, but whether the terminal correctly returns the Claude Code version number.

Only after this step passes is the local installation truly complete. If you can see the version number, the local installation step is complete.

Step 3: Configure Claude Code

Configuration File Location

  • MacOS / Linux: ~/.claude/settings.json
  • Windows: %userprofile%\.claude/settings.json

If this file does not exist, create it first. If it already exists, replace the original content with the following:

Code block JSON
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://tokenadvent.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxx",
    "ANTHROPIC_MODEL": "claude-opus-4-8",
    "CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
  },
  "alwaysThinkingEnabled": true,
  "effortLevel": "medium"
}

Configuration Notes

  • ANTHROPIC_AUTH_TOKEN: replace this with the real key you obtained from the platform.
  • ANTHROPIC_MODEL: replace this with the model name you want to use.
  • effortLevel: replace this with the thinking intensity you want to use.
  • Supported levels: low, medium, high.

After the configuration is complete, restart the cmd window and begin using it normally.