2026 Updated Claude Code + cc-switch + Git + Node.js Installation & Configuration Guide (Domestic China Compatible Version)
A comprehensive, step-by-step guide to installing and configuring Claude Code, cc-switch, Git, and Node.js for developers in China—including domestic...
For developers in China looking to leverage AI-assisted coding with Claude Code, setting up the necessary tools can be tricky due to regional access constraints. This 2026 updated guide provides a one-stop solution to install and configure Claude Code, cc-switch, Git, and Node.js—complete with domestic mirror setups and visual management tools to ensure smooth operation within China.
Installation Order (Strictly Follow to Avoid Dependency Errors): Node.js → Git → Claude Code CLI → cc-switch → VSCode Claude Code Plugin → cc-switch Configuration → Full Verification.
Step 1: Install Node.js (≥18 LTS Required)
Node.js is a prerequisite for Claude Code and cc-switch, as both depend on npm. Download the LTS version from the official website (https://nodejs.org/). For Windows, ensure "Add to PATH" is checked during installation. On macOS, use the .pkg installer or Homebrew (brew install node). For Linux, run sudo apt install nodejs npm. Verify installation with node -v and npm -v (version ≥18.17.0 recommended). To speed up npm installs in China, set the Taobao mirror: npm config set registry https://registry.npmmirror.com.
Step 2: Install Git Version Control
Git helps Claude Code read project context, including changes, diffs, and commit records. Download from https://git-scm.com/downloads. For Windows, use default settings and enable "Git Bash Here". On macOS, use Homebrew (brew install git), and on Linux, sudo apt install git. Configure global user credentials: git config --global user.name "Your Name" and git config --global user.email "your.email@example.com". Verify with git config --global --list.
Step3: Install Claude Code CLI (Anthropic Official Tool)
Install globally using npm with the domestic mirror to avoid access issues: npm install -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com (add sudo for macOS/Linux). Verify with claude --version. Initialize to generate the .claude config folder by running claude and exiting.
Step4: Install cc-switch (Visual Configuration Tool)
cc-switch simplifies managing Claude Code's API settings, keys, and models—no manual JSON edits needed. It supports domestic models like DeepSeek, Zhipu GLM, and MiniMax (compatible with Anthropic's protocol). Download the appropriate installer from GitHub Releases (https://github.com/farion1231/cc-switch/releases): .msi for Windows, .dmg for macOS, .deb/.AppImage for Linux. After installation, initialize by opening cc-switch and selecting "Init → Initialize Claude Env" to link with the .claude folder.
Step5: Integrate Claude Code with VSCode
Install VSCode (version ≥1.98.0) from https://code.visualstudio.com/. Use Ctrl+Shift+X (Cmd+Shift+X on macOS) to search for "Claude Code for VS Code" (official Anthropic plugin) and install it. Restart VSCode—look for the Claude icon in the top-right or left activity bar to confirm integration. Note: Open a project folder (not a single file) to enable Git context reading.
Step6: Configure cc-switch for Domestic API Access
Prepare an API key: Domestic models like DeepSeek are recommended (apply at https://platform.deepseek.com/). In cc-switch, go to the "Claude Code" tab, click "+ Add Provider", select DeepSeek (or Custom), and fill in the details (e.g., Base URL and API key for DeepSeek).
Sources
- CSDN Blog: "Claude Code + cc-switch + Git + Node.js One-Stop Complete Installation and Configuration Guide (2026 Latest Domestic Available Version)" by pangzi62732 (https://blog.csdn.net/pangzi62732/article/details/163441201)