🪄 Integrating Claude Code with CodingPlanX Custom Models

Claude Code is a powerful AI programming assistant launched by Anthropic. It embeds directly into your terminal, understands your codebase, and collaborates seamlessly with you to write, refactor, and debug code.

This tutorial will guide you through environment preparation, tool installation, and exclusive configuration for the codingplanx.ai proxy interface.


📋 System Requirements

Before starting, please ensure your system meets the following minimum requirements:

  • Node.js: Version >= 18.0
  • Operating System: macOS, Linux, Windows (WSL recommended)

🚀 Quick Start

1. Install Node.js

💡 Tip: If you already have Node.js 18.0 or higher installed, please skip this step directly.

🍎 macOS Users

Installing via Homebrew is recommended:

# 1. Install Xcode command line tools
sudo xcode-select --install

# 2. Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 3. Install Node.js via Homebrew
brew install node

# 4. Verify installation
node --version

🐧 Ubuntu / Debian Users

Use the official NodeSource script to install the LTS version:

# 1. Download and run the installation script
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo bash -

# 2. Install Node.js
sudo apt-get install -y nodejs

# 3. Verify installation
node --version

🪟 Windows Users

It is recommended to use the winget command line for installation, or go to the Node.js Official Website to download the installer:

# Install Node.js LTS version using winget
winget install OpenJS.NodeJS.LTS

# Verify installation (You may need to restart the terminal after installation)
node --version

2. Install Claude Code

Open your terminal and use npm to install Claude Code globally:

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

# Verify if the installation was successful
claude --version

(Note: If you encounter permission errors, macOS/Linux users may need to use sudo npm install -g @anthropic-ai/claude-code)


3. Configure and Start Using

🔑 Obtain Necessary Configuration Information

To use this service, you need to prepare the following two environment variables:

SettingDescriptionHow to Obtain
ANTHROPIC_AUTH_TOKENAPI Auth TokenAfter registering, go to the API Tokens page and click Add Token (Starts with sk-)
ANTHROPIC_BASE_URLAPI Service AddressFill in exactly: https://api.codingplanx.ai

📝 Suggestions when creating a token:

  • Name: Name it anything (e.g., claude-code-cli)
  • Quota: Set to Unlimited Quota
  • Group: Select Claude code exclusive or Official Claude 3 & above Proxy
  • Other Options: Keep default settings

💻 Launch Claude Code

Please choose the corresponding startup command based on your operating system and terminal. Please navigate to your project directory first:

cd your-project-folder

🟢 Linux / macOS (Bash/Zsh)

# Set environment variables (effective for the current terminal session)
export ANTHROPIC_AUTH_TOKEN="sk-YourActualToken"
export ANTHROPIC_BASE_URL="https://api.codingplanx.ai"
export API_TIMEOUT_MS="300000"  # Set to 300 seconds timeout to prevent disconnections on long answers

# Launch Claude Code
claude

🔵 Windows PowerShell

# Set environment variables (effective for the current terminal session)
$env:ANTHROPIC_BASE_URL = "https://api.codingplanx.ai"
$env:ANTHROPIC_AUTH_TOKEN = "sk-YourActualToken"
$env:API_TIMEOUT_MS = "300000"

# Launch Claude Code
claude

⚫ Windows CMD

set ANTHROPIC_BASE_URL=https://api.codingplanx.ai
set ANTHROPIC_AUTH_TOKEN=sk-YourActualToken
set API_TIMEOUT_MS=300000

claude

💡 Pro Tip: If you don't want to enter environment variables every time, you can add the export statements above to your ~/.bashrc or ~/.zshrc file (Mac/Linux), or add permanent environment variables in Windows system settings.

⚙️ First Run Configuration Wizard

When launching claude for the first time, the system will guide you through basic settings:

  1. Theme 👉 Select your preferred terminal color scheme, press Enter to confirm.
  2. Safety 👉 Read and confirm the safety prompts, press Enter.
  3. Terminal 👉 Default settings are recommended, press Enter.
  4. Trust 👉 Confirm that you trust the current working directory, press Enter.

Congratulations! When you see the input prompt, you can start chatting with your AI programming partner! Try typing: "Help me explain the main structure of this project".


❓ Frequently Asked Questions (FAQ)

Q: Encountering Invalid API Key · Please run /login error?

A: This indicates that Claude Code failed to read your environment variables. Please check:

  1. Whether ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL are set correctly.
  2. Whether the token format is correct (it must start with sk- and contain no extra spaces or quotes).
  3. If you configured permanent environment variables, ensure you have restarted your terminal for them to take effect.

Q: Why does the bottom left corner of the terminal show offline status?

A: Claude Code defaults to pinging google.com to check network status. In certain restricted network environments, showing offline is normal and will not affect your normal usage and code generation at all.

Q: Why does asking Claude to browse the web (Fetch) fail?

A: Before accessing external web pages, Claude Code needs to call official services for security checks. If you encounter Fetch failures:

  1. Ensure your computer has a stable international internet connection.
  2. If necessary, enable a global terminal proxy (e.g., export https_proxy=...).

Q: Why do requests always prompt fetch failed or timeout?

A: This is usually caused by network fluctuations or proxy forwarding. Solutions:

  1. Check if the timeout environment variable is set correctly: API_TIMEOUT_MS=300000.
  2. Try changing your local proxy node.
  3. Press Ctrl+C to exit the current session and re-run the claude command.

Q: Web login error?

A: If you encounter anomalies on the web page when obtaining a Token, try clearing your browser's Cookie cache, or use Incognito mode to log in to yunwu.ai again.


📌 Important Notes

  • 🛡️ Interface Notice: This site connects directly to the official Claude Code forwarding service, perfectly adapted for the CLI tool.
  • 🚦 Rate Limits: The current configuration only supports Claude Code API traffic and does not support standard API calls for other third-party clients.
  • 🔒 Security Warning: Please keep your API token (sk-...) safe. Never hardcode it in your scripts or upload it to public GitHub repositories.