Windows setup guide
For Windows 10 / 11. Everything is done in PowerShell, no admin rights needed.
1. Open a terminal
Press Win + X and choose “Terminal” or “Windows PowerShell”. Run all commands below in PowerShell; do not use the old cmd window.
2. Install Node.js
Claude Code requires Node.js 18 or later; on Windows it also needs Git for Windows (which provides Git Bash). Install them with the built-in winget:
winget install OpenJS.NodeJS.LTS
winget install Git.GitAfter installing, close and reopen the terminal, then check the versions:
node -v
git --versionnpm says “running scripts is disabled on this system”, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once and confirm with Y.3. Set environment variables
Set the two variables below. The endpoint is https://api.tokilabs.xyz.
| Variable | Value | Used by |
|---|---|---|
ANTHROPIC_BASE_URL | https://api.tokilabs.xyz | Claude Code, Anthropic SDK |
ANTHROPIC_AUTH_TOKEN | sk-your-key | Claude Code |
# Write to user environment variables, permanent (no admin rights needed)
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.tokilabs.xyz", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", "User")Check that it worked
After running the commands, close all terminal windows and VS Code, then reopen them for the new variables to take effect. Check with:
$env:ANTHROPIC_BASE_URLPrefer not to use commands? Set them in the GUI
- Press Win, search for “Edit environment variables for your account” and open it.
- Under “User variables”, click “New” and add the two variables from the table above.
- Click “OK” to save, then reopen the terminal.
4. Verify the connection
If you get a JSON model list containing "data", both the endpoint and the key are fine.
# Note: in PowerShell use curl.exe; plain curl calls Invoke-WebRequest
curl.exe "$env:ANTHROPIC_BASE_URL/v1/models" -H "Authorization: Bearer $env:ANTHROPIC_AUTH_TOKEN"401 means the key is wrong or no longer valid; for connection timeouts, check your local proxy settings. See the FAQ.5. Install Claude Code
irm https://claude.ai/install.ps1 | iexOr install with npm:
npm install -g @anthropic-ai/claude-codeSkip the official account sign-in on first launch:
# Create only if the file does not exist, to avoid overwriting existing settings
if (!(Test-Path "$HOME\.claude.json")) {
[IO.File]::WriteAllText("$HOME\.claude.json", '{"hasCompletedOnboarding": true}')
}Start it in your project directory:
cd your-project
claudeAfter launch, type /status. If Base URL shows https://api.tokilabs.xyz, requests go through Toki Labs. Type /model to switch models, for example claude-opus-5-5. More settings in Claude Code configuration.
Using WSL
If you develop in WSL (Windows Subsystem for Linux), follow the Linux setup guide in the WSL terminal. WSL and Windows environment variables are separate and must be configured individually.
Revert
When you no longer need it, delete these environment variables to restore the defaults:
foreach ($n in "ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN") {
[Environment]::SetEnvironmentVariable($n, $null, "User")
}