Overseas access: www.kdjingpai.com
Ctrl + D Favorites

Claude Code Native Support for Windows: An Extensive Installation and Configuration Guide

2025-07-18 23

Claude Code As a product of Anthropic The company launched a command line AI programming aid that can interact with project code directly in a terminal environment to help developers accomplish tasks such as code generation, logic interpretation and error troubleshooting. In 1.0.51 After the version update, theClaude Code finally Windows platform brings native support, which means Windows Users no longer need to go through the WSL (Windows Subsystem for Linux) for tedious configuration, thus avoiding potential performance overhead and file system compatibility issues.

Environmental requirements

Before installing, make sure the system meets the following conditions:

  • operating system
    • Windows. Windows 10 or later
    • macOS. macOS 10.15 or later
    • Linux. Ubuntu 20.04+ / Debian 10+ or compatible distributions
  • Common tools

Installation and Configuration

Installation varies slightly from platform to platform, so here are the steps.

Mac and Linux

exist macOS maybe Linux On the system, open a terminal and execute the following global install command:

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

Once the installation is complete, you need to configure environment variables for authorization. Edit the user directory of the .zshrc (Zsh) or .bashrc (Bash) configuration file, add the following:

export ANTHROPIC_API_KEY="sk-..."
export ANTHROPIC_BASE_URL="https://api.anthropic.com"

draw attention to sth.: In macOS You can use the shortcut Command+Shift+. to show the hidden files, then use a text editor to open the .zshrc Documentation.

After adding the configuration, execute the source ~/.zshrc command to make the changes take effect immediately.

Windows Native Configuration

Windows Platform's native support dependencies Git for Windows The Unix command-line toolset provided.

  1. Installing Git for Windows
    please go to gitforwindows.org Download and install the latest version. The installer will automatically configure the grep,curl,ssh and other necessary orders.
  2. Setting Enforcement Policies
    Open in administrator mode PowerShell, run the following command to allow npm Execute the installation script:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
  3. Global Installation Claude Code
    exist PowerShell Execute the following command to install it:

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

    If you encounter errors related to script execution during installation, try using the --ignore-scripts parameter to resolve:

    npm install -g @anthropic-ai/claude-code --ignore-scripts
    
  4. Configuring Environment Variables
    show (a ticket) PowerShell and execute the following command to set the environment variable, please set the sk-... Replace your API Key.

    [System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-...", "User")
    [System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.anthropic.com", "User")
    

    After the configuration is complete, you need to reboot the PowerShell Terminal to enable environment variables.

First time startup and use

After completing the installation and configuration, you can start using it.

  1. starter kit
    In the terminal, go to your project folder and execute the claude Command.

    cd ~/Desktop/my-project
    claude
    
  2. Verify Configuration
    You can always run claude doctor command to check the Claude Code configuration is correct, it will list the currently detected API keys and Base URLThe
  3. Account Authorization
    At first startup, if you do not use the custom API key, the tool may open an authorization page in your browser, requiring you to log in to the Claude Official website for confirmation.

    When the tool detects that you have configured custom API When the key is used, you will be prompted whether to use the key or not, select "Yes" to do so.

    If you are using a third-party proxy service and wish to skip the official login authentication process, you can add a new proxy to your user home directory in the .claude.json The following is added to the file:

    {
    "hasCompletedOnboarding": true
    }

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish