Claude Code Installation Guide: Complete Setup for CLI + VS Code + Desktop

Complete Windows tutorial for installing Claude Code and connecting it to the DeepSeek API.
This article provides a detailed walkthrough for installing and configuring Claude Code on Windows across three modes: CLI, VS Code extension, and desktop application. It covers setting up Node.js and Git as prerequisites, using the CC Switch proxy tool to redirect Claude Code's API requests to DeepSeek for cost-effective AI-assisted programming, and addresses key steps including environment variable configuration, config file modification, and enabling Windows virtualization features.
Introduction
Claude Code is an AI programming assistant developed by Anthropic, available in three modes: command line (CLI), VS Code extension, and desktop application. This article provides a step-by-step guide to fully installing and configuring Claude Code on Windows, and connecting it to the DeepSeek API via the CC Switch tool for cost-effective AI-assisted programming.
Claude Code is developed by Anthropic, a company focused on AI safety research, founded by former core members of OpenAI. Its Claude model series is renowned for powerful code comprehension, long-context processing, and precise instruction-following capabilities. The core value of an AI programming assistant lies in its ability to understand natural language requirements and generate, debug, and refactor code — significantly lowering the barrier to development and allowing developers to drive complex programming tasks through conversation.
Note: If you are located in mainland China, you'll need to set up network access to reach overseas services first.
Environment Preparation: Installing Node.js and Git
Installing Node.js
Claude Code depends on the Node.js runtime environment. Here's how to install it:
Node.js is a JavaScript runtime built on Chrome's V8 engine, enabling JavaScript execution outside the browser. The Claude Code CLI is essentially a Node.js application distributed via npm (Node Package Manager). It's recommended to download the LTS (Long-Term Support) version for better stability.
- Open your browser and visit the official Node.js website to download the installer
- Double-click the downloaded installer and follow the default options, clicking "Next" through each step
- You can modify the installation path as needed or keep the default
Installing Git
Git is another dependency required for Claude Code to function. Git is currently the most popular distributed version control system — Claude Code needs to call Git commands to understand project structure and history when analyzing code repositories and tracking file changes:
- Open the official Git download page
- Windows users should select the corresponding version (standard x64 or ARM processor)
- Double-click the installer and keep the default configuration
CLI Mode Installation and Configuration
Installing Claude Code CLI
Visit the official Claude Code website to get the installation command. Run PowerShell as administrator, paste the installation command, and press Enter. Wait for the installation to complete — npm will automatically download all dependencies and finish the configuration.
Configuring Environment Variables
After installation, you need to manually add environment variables so the system can recognize the claude command. Environment Variables are key-value pairs used by the operating system to store system-level configuration. The Path variable specifically tells the system which directories to search for executable programs. After adding Claude Code's installation path, the system can recognize and run the claude command from any directory:
- Type "Environment Variables" in the Windows search bar to open the system environment variables settings
- Select the Path variable and click Edit
- Find Claude Code's installation path:
C:\Users\YourUsername\AppData\Local\bin - Click "New", paste the path, and confirm

Once configured, press Win+R, type cmd to open the command prompt, and enter claude to verify the installation was successful.
Modifying the Configuration File to Bypass Official Verification
Since we're using a third-party API rather than the official one, we need to modify the configuration file. claude.json is Claude Code's local configuration file — by adding specific fields, you can instruct the program to skip official account verification and use a custom API endpoint instead:
- Navigate to
C:\Users\YourUsername\ - Find the
claude.jsonfile and open it with Notepad (right-click) - Add a line of configuration on the second line (keep two spaces at the beginning and add a comma at the end)
- Save and close the file
Installing CC Switch and Connecting to the DeepSeek API
Downloading and Installing CC Switch
CC Switch is an open-source local proxy tool that works by intercepting API requests from Claude Code and redirecting them to third-party services like DeepSeek that are compatible with the OpenAI API format. This approach is feasible because the OpenAI API format has become the de facto industry standard — mainstream models like DeepSeek and Qwen all provide compatible interfaces, allowing Claude Code to seamlessly switch underlying models without modifying client code:
- Open the CC Switch GitHub page
- Scroll to the bottom of the page and find the Windows installation file to download
- Double-click to install, clicking "Next" through each step

Obtaining a DeepSeek API Key
DeepSeek is a large language model series from the company DeepSeek, known for its highly competitive pricing and excellent coding capabilities, performing well across multiple programming benchmarks. Its API uses a per-token billing model with separate pricing for input and output, with overall costs far lower than comparable products — making it ideal for individual developers' daily use:
- Visit the DeepSeek official website and go to the API platform
- After logging in, top up your account first (minimum 1 RMB; 10-20 RMB recommended)
- Click "Create API Key", enter a name, and create it
- Be sure to copy and save the API Key immediately, as it cannot be viewed again later
Configuring CC Switch to Connect to DeepSeek
- Open CC Switch and click the plus icon to add a new configuration
- Select DeepSeek as the provider
- Enter the API Key you just obtained
- If you want to use the million-token context, check the corresponding checkbox
- Click "Add" to complete the configuration
Million-token context (1M Context) means the model can process approximately 750,000 English words or an equivalent amount of Chinese characters in a single request — extremely useful for scenarios requiring analysis of large codebases or understanding complete project structures. DeepSeek's pricing at this tier offers significant advantages compared to similar products like GPT-4.

After configuration, click "Model Test" to verify the connection is working, then click "Enable". Now when you type claude in the command line, you'll see the model has switched to DeepSeek V4 Pro and is ready for use.
VS Code Extension Configuration
Installing VS Code Editor
VS Code (Visual Studio Code) is Microsoft's open-source lightweight code editor, which has become one of the most popular development tools thanks to its rich plugin ecosystem and cross-platform support. Download the installer from the VS Code official website and double-click to install:
- Open VS Code and click the Extensions button on the left sidebar
- Search for "Chinese" to install the Chinese language pack (optional)
- Restart VS Code for changes to take effect
Installing the Claude Code VS Code Extension
- Search for "Claude Code" in the Extensions Marketplace
- Find the official extension and click Install
- After installation, a Claude Code icon will appear in the left sidebar
- Click the icon to open the chat window and use Claude Code within VS Code
Since CC Switch and the DeepSeek API were already configured earlier, the VS Code extension will automatically inherit the CLI configuration — no additional setup required. This is because the VS Code extension calls the same local CLI tool under the hood, and CC Switch's proxy applies uniformly to all calling methods.
Desktop Application Installation and Configuration
Installing the Claude Code Desktop Application
- Open the Claude Code desktop download URL in your browser
- Download and double-click to install
- After installation, the login interface will automatically open
Key Configuration Steps
Do not click the "Start" button directly, since we're using a third-party API:
- Click the top-left menu → Help → Open Developer Platform
- Click Enable to activate developer mode

Configuring CC Switch Desktop Routing
In CC Switch, switch to the "Desktop" tab:
- Click the plus icon, select DeepSeek, and enter the API Key
- Check the million-token context option and click Add
- Go to "Settings" → "Routing" and enable local routing
- Enable the DeepSeek model
Enabling Windows Virtualization Features
If the desktop app reports "Virtual Machine Platform unavailable", you need to enable Windows virtualization features. The Claude Code desktop app relies on containerization technology to run isolated code execution environments, which requires underlying Windows virtualization support: WSL (Windows Subsystem for Linux) allows running a native Linux environment on Windows; Virtual Machine Platform is the underlying dependency for WSL 2, providing hardware-assisted virtualization; Windows Hypervisor Platform (Hyper-V) provides hardware-level virtualization acceleration. Together, these three components form the infrastructure for the desktop app's sandbox runtime — missing any one of them may cause startup failures:
- Search for "Turn Windows features on or off"
- Check the following three items:
- Virtual Machine Platform
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.