Skip to content

Claude Code Setup Guide ​

Install and configure the Claude Code CLI tool to connect to the Coding Flow platform.

Claude Code is Anthropic’s official CLI tool and a powerful AI coding assistant. This guide walks you through installation and configuration.

Before you start, complete the Node.js installation guide.

Prerequisites

  • A valid API Key (e.g. sk-******)
  • An accessible service address (Base URL) (usually provided by your deployment/gateway)

Common service Endpoint for This Site

Step 1: Install Claude Code ​

Open a terminal (PowerShell or CMD on Windows) and run:

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

This command downloads and installs the latest version of Claude Code from the npm registry.

If you run into permission issues on macOS/Linux, use sudo:

Bash
sudo npm install -g @anthropic-ai/claude-code

Verify installation

After installation, run the command below. If it prints a version number, the installation succeeded.

Bash
claude --version

Step 2: Project Configuration ​

1. Global configuration ​

Windows
# Create C:\Users\<your-username>\.claude\settings.json and add the following content:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.codingflow.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": 1
  }
}
Linux
# Create settings.json
cat > ~/.claude/settings.json << 'EOF'
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.codingflow.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": 1
  }
}
EOF
macOS
# Create settings.json
cat > ~/.claude/settings.json << 'EOF'
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.codingflow.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": 1
  }
}
EOF

2. Project-level configuration ​

Create a .claude directory in the root of your project, and create a settings.json file inside it. Then configure the settings.json file. Replace ANTHROPIC_AUTH_TOKEN with your API key, and replace ANTHROPIC_MODEL with the model you want to use.

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.codingflow.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": 1
  }
}

3. Skip login verification ​

This configuration bypasses Claude's login verification, allowing you to use Claude Code directly.

Inside the outermost braces of the ~/.claude.json file, find an appropriate location and add this configuration item: "hasCompletedOnboarding": true.

Windows
# Edit C:\Users\<your-username>\.claude.json
{
  // ... other configuration
  "hasCompletedOnboarding": true
}
Linux
# Edit ~/.claude.json
{
  // ... other configuration
  "hasCompletedOnboarding": true
}
macOS
# Edit ~/.claude.json
{
  // ... other configuration
  "hasCompletedOnboarding": true
}

Important

Replace YOUR_API_KEY with the API Key you obtained from the Coding Flow platform.

Configuration parameters

  • ANTHROPIC_BASE_URL: The API endpoint provided by the model provider, fixed to https://api.codingflow.ai.
  • ANTHROPIC_AUTH_TOKEN: The authentication key, here represented as YOUR_API_KEY.
  • ANTHROPIC_MODEL: The model name.
  • CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: Force-disable all experimental Beta features.

For more detailed parameter descriptions, refer to Claude Code parameter configuration.

Step 3: Start using Claude Code ​

Bash
claude

FAQ ​

Q: context_management: Extra inputs are not permitted ​

A: Please configure CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: 1 in the configuration file to forcibly disable all experimental Beta features.


Q: ValidationException: prompt is too long: 1004239 tokens > 1000000 maximum ​

A: Please configure CLAUDE_CODE_AUTO_COMPACT_WINDOW: 1000000 in the configuration file to automatically compress the context window, avoiding exceeding the maximum token limit.