Windows Claude Code Installation Guide: 2025 Complete Tutorial (Node.js Setup + Troubleshooting)

10/26/2025 gacclaude codeclaudetutorial

Keywords: Windows Claude Code installation, Claude Code Windows tutorial, Claude Code plugin installation, Node.js configuration for Claude Code, GAC authorization for Claude Code, API Key configuration for Claude Code

Claude Code is a powerful AI code assistant that can be integrated into IDEs (such as VS Code) on Windows to boost development efficiency. This tutorial details two ways to install Claude Code on Windows: GAC in-site authorization installation (recommended for IDE plugin integration) and API Key configuration installation. Whether you're installing for the first time or running into issues, this guide will walk you through deployment step by step. The tutorial is based on a Node.js 18+ environment to ensure compatibility. Before installing, please prepare a VPN/proxy tool (some steps require accessing external resources).

Note: Installing Claude Code requires Node.js, npm, and Git. The entire process doesn't need a complex proxy, but the authorization step may require turning off the network to avoid interference. Estimated installation time: 10–15 minutes.

This method authorizes through the GAC official website. It's simple and fast, and well-suited to first-time users. If you use the Claude Code plugin in your IDE, prioritize this method.

# 1. Verify your Windows system environment setup (Node.js, npm, Git)

First, make sure your Windows system has the following tools installed. Open Command Prompt (CMD) or PowerShell and run the following commands to check versions:

node -v    // Node.js version must be 18 or higher
npm -v     
git -v     

If the npm command reports an error (permission issue), run the following PowerShell command to set the execution policy:

Set-ExecutionPolicy RemoteSigned

Enter Y to confirm.

Node.js npm Git version check

# 2. Install Claude Code

Once the environment is ready, run the following npm global install command (using a domestic mirror for faster speeds):

npm install -g https://gaccode.com/claudecode/install --registry=https://registry.npmmirror.com

The installation may take a few minutes; it's ready to use once finished.

Claude Code installation successful

# 3. First login and GAC authorization verification

After installation, log in with the following command:

claude login
  • On first use, GAC will open a browser window asking for subscription verification. Complete the authorization through the browser (no proxy needed).
  • If the window doesn't pop up automatically, manually copy the link shown in the command line and open it in your browser. After authorizing, copy the verification code back to the command line and press Enter to continue.
  • After logging in, choose an interface theme and allow Claude Code to access the files in the current directory.

Authorization successful — you're done! 🎉

Claude Code login authorization

Congratulations! Claude Code has been installed and deployed successfully. Now you can use it directly from the command line, or integrate it into your IDE plugin to accelerate coding.

# 4. Common troubleshooting (Method 1)

  • Authorization failure: Disable the local proxy, restart the terminal, and run claude login again.
  • Error "401 No valid credentials provided" (if you previously used another service):
    • Delete environment variables: Win + R > type sysdm.cpl > Advanced > Environment Variables > User variables > delete all variables starting with ANTHROPIC > Save > open a new command line and run claude login.
    • Or edit the JSON config: navigate to C:\Users\YourUsername\.claude, modify or delete settings.json, then retry logging in.

# Installation Method 2: API Key Configuration (for users with custom keys)

This method obtains an API Key from the GAC official website for configuration, offering greater flexibility. It suits users who need precise control over access.

# 1. Verify your Windows system environment setup (Node.js, npm, Git)

Same as Method 1, run the following commands to verify:

node -v    // Node.js version must be 18 or higher
npm -v     
git -v     

Download links are the same as above. If npm reports an error, run Set-ExecutionPolicy RemoteSigned and confirm with Y.

Node.js npm Git version check (Method 2)

# 2. Install Claude Code

Run the official npm install command:

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

Check the version output to confirm the installation succeeded.

Official Claude Code install

# 3. Configure the API key

  • Get your key from the API key section of the GAC official website (gaccode.com).
  • Navigate to C:\Users\YourUsername\.claude, modify or create a settings.json file, and add the following content (replace with your actual key):
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://gaccode.com/claudecode",
    "ANTHROPIC_API_KEY": "Your API Key"
  }
}

# 4. Configure jq (optional; run in Git Bash; requires a VPN)

Most users can skip this step. If Claude Code works normally after Step 3, ignore this section.

In Git Bash, run:

curl -L https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe -o /tmp/jq.exe
mkdir -p ~/bin
mv /tmp/jq.exe ~/bin/jq.exe
export PATH=$PATH:~/bin
jq --version

Then set the environment variables:

export ANTHROPIC_BASE_URL=https://gaccode.com/claudecode
export ANTHROPIC_API_KEY=Your API Key

Update the configuration file:

(cat ~/.claude.json 2>/dev/null || echo 'null') | jq --arg key "${ANTHROPIC_API_KEY: -20}" '(. // {}) | .customApiKeyResponses.approved |= ([.[]?, $key] | unique)' > ~/.claude.json.tmp && mv ~/.claude.json.tmp ~/.claude.json

jq configuration process

# 5. Log in to Claude Code and integrate with your IDE

Once configured, open a new PowerShell or CMD window and run:

claude login
  • Choose a theme and allow access to the directory files.
  • IDE integration: In the extension marketplace of VS Code or another IDE, search for the "Claude Code" plugin and install it with one click. Once configured, you're ready to launch.

Extra IDE configuration: create or modify config.json under C:\Users\YourUsername\.claude:

{
  "primaryApiKey": "Your API Key"
}

Claude Code IDE plugin launch

Congratulations! Claude Code has been installed and deployed successfully. Now enjoy the fun of AI-assisted coding! 🎉🎉🎉

# 6. Common troubleshooting (Method 2)

  • Login error "country/region not supported": Enable TUN or virtual network card mode.
  • Missing API Key: Check that the settings.json configuration is correct, then retry in a new terminal or IDE.
  • jq configuration failed: Make sure Git Bash is installed, and restart the terminal.