WSL Setup

Windows users can run AI terminals like Claude Code inside WSL (Windows Subsystem for Linux) for a native-Linux-like experience. This guide covers connecting to CQT AI from within WSL.

If you've already set it up in a native Windows terminal, you can skip this guide. WSL suits developers who need a Linux environment.

Prerequisites

  • Windows 10/11.
  • You've obtained a CQT AI APIKey (created in the console under "APIKey Management").

Step 1: Install WSL

Open PowerShell as administrator and run:

wsl --install

After installation, restart your computer; on first launch you'll be prompted to create a Linux username and password.

Step 2: Enter WSL and install Node.js

Open "Ubuntu" (or run wsl to enter), then install Node.js 18+:

# Install nvm, then use it to install Node (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts

# Verify
node -v

Step 3: Install Claude Code

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

Step 4: Point it at CQT AI

Create and edit the Claude Code config file:

mkdir -p ~/.claude
nano ~/.claude/settings.json

Write the following (replace the APIKey with your own):

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-APIKey",
    "ANTHROPIC_BASE_URL": "https://api.cqtai.com",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

Step 5: Run

claude

Chat to test that the setup works.

💡 WSL shares the network with Windows. If you use a proxy, make sure https://api.cqtai.com is reachable from inside WSL.

FAQ

  • wsl --install errors: Confirm the "Virtual Machine Platform" and "Windows Subsystem for Linux" features are enabled, and restart.
  • node command not found: Reopen the terminal or run source ~/.bashrc to load nvm.
  • 401 authentication failed: Check that ANTHROPIC_AUTH_TOKEN is correct with no extra spaces.
  • Connection failed: Confirm ANTHROPIC_BASE_URL is https://api.cqtai.com and the network is reachable from inside WSL.