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 --installAfter 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 -vStep 3: Install Claude Code
npm install -g @anthropic-ai/claude-codeStep 4: Point it at CQT AI
Create and edit the Claude Code config file:
mkdir -p ~/.claude
nano ~/.claude/settings.jsonWrite 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
claudeChat to test that the setup works.
💡 WSL shares the network with Windows. If you use a proxy, make sure
https://api.cqtai.comis reachable from inside WSL.
FAQ
wsl --installerrors: Confirm the "Virtual Machine Platform" and "Windows Subsystem for Linux" features are enabled, and restart.nodecommand not found: Reopen the terminal or runsource ~/.bashrcto load nvm.- 401 authentication failed: Check that
ANTHROPIC_AUTH_TOKENis correct with no extra spaces. - Connection failed: Confirm
ANTHROPIC_BASE_URLishttps://api.cqtai.comand the network is reachable from inside WSL.