Overview
Claude Code is a command-line AI programming assistant launched by Anthropic, with a variety of built-in Skills plugins. Through different combinations, it can accomplish many things that AI alone cannot do. After connecting to the domestic large model DeepSeek V4, usage costs can be significantly reduced.
Core uses:
- Building a personal knowledge base, automating the organization of study notes
- Collecting industry information on schedule and organizing it into manuscripts
- Automatically publishing to various social media platforms
Step 1: Install the Runtime Environment
1.1 Install Node.js
Go to the Node.js official website to download the Windows installer (.msi), double-click and follow the prompts.
Verify installation:
|
|
1.2 Configure npm Domestic Mirror
|
|
Why configure a mirror?The default npm source is overseas, and download speeds are very slow. After configuring a domestic mirror, installation speed can be improved by more than 10 times.
1.3 Install Git
Go to the Git official website to download the corresponding version installer and follow the prompts.
Verify installation:
|
|
1.4 Install CC-Switch
CC-Switch is used to connect third-party models to Claude Code.
Go to the GitHub Release page to download the corresponding version (e.g., Windows MSI), double-click to install, and follow the prompts.
Step 2: Install Claude Code
|
|
Verify:
|
|
Skip Login (Using Third-party API)
- Launch Claude Code once and then close it
- Find the
.claude.jsonfile in your user directory - Add the following field (note that a comma must be added at the end of the previous field):
|
|
- Re-execute
claudeto start, and choose to trust the current folder
Common ErrorIf you forget to add a comma at the end of the previous field, it will cause a JSON parsing error and Claude Code will fail to start.
Step 3: Connect DeepSeek
3.1 Get API Key
- Open DeepSeek Open Platform, register and log in
- Ensure your account has a balance
- Click API Keys on the right → Create API Key → Copy and save (cannot be viewed again after closing)
Key SecurityDo not share your key with others, as it will consume your balance.
3.2 Configure CC-Switch
- Open CC-Switch, click the + button in the upper right corner
- Select DeepSeek as the model preset
- Enter the API Key
- Change the model name uniformly to:
deepseek-v4-pro[1m](context 1M, Claude Code uses 128K by default) - Click Add
3.3 Verify the Model
In the Claude Code dialog box, enter:
|
|
You can view the currently available models, or directly ask “What model are you currently using” to confirm successful connection.
Step 4: Hands-on Example
- Create a new folder on the desktop
- Enter
CMDin the address bar and press Enter - Execute
claudeto start, and choose to trust the current folder - Enter your requirement:
Use HTML + JS + CSS to create a Todo app - During execution, it will request tool permissions — select Yes
- After completion, ask it to open the page for preview
TipYou can describe your requirements directly in Chinese — Claude Code supports mixed Chinese and English input.
Command Quick Reference
| Operation | Command |
|---|---|
| Node version check | node -v |
| npm version check | npm -v |
| npm domestic mirror | npm config set registry https://registry.npmmirror.com/ |
| Git version check | git -v |
| Install Claude Code | npm install -g @anthropic-ai/claude-code |
| Claude Code version check | claude --version |
| Launch Claude Code | claude |
| Switch model | /model |
FAQ
Command not found after runningclaude?Check if Node.js is installed successfully (
node -v) and whether the npm global path is in the system PATH.
Prompts to log in to Anthropic account after starting?The
hasCompletedOnboardingin.claude.jsonis not configured correctly. Please go back to Step 2 to check.
Model call error / no response?Check if your DeepSeek account balance is sufficient, and whether the API Key in CC-Switch is entered correctly.