Claude Code Installation Tutorial
Claude Code is a powerful AI coding assistant from Anthropic that you can use directly in the terminal or in VS Code. Based on the latest version (tested January 2026), this tutorial details the complete Claude Code installation process and how to use the modified Claude Code YOLO plugin to easily switch to third-party models (such as DeepSeek, Groq, OpenAI, etc.), significantly cutting costs and boosting speed.
This article takes you from zero through installation and configuration step by step — all steps verified on Windows/macOS/Linux.
1. Install Claude Code
1.1 Download and install Node.js
Go to the Node.js official website and download the latest LTS version for your system:

https://nodejs.org/en/download
After installation, open a command line (CMD or PowerShell on Windows, Terminal on macOS/Linux) and run the following commands to verify:

node -v
npm -vIf you see version numbers, Node.js and npm are installed correctly.
1.2 Install Claude Code globally
Run the following command in PowerShell or Terminal:

npm install -g @anthropic-ai/claude-code1.3 Create the config.json configuration file
Depending on your system, create a .claude folder in the corresponding directory and add config.json:
- Windows:
C:\Users\YourUsername\.claude\ - macOS / Linux:
~/.claude/
File content (any string is fine):

{
"primaryApiKey": "any-string-is-ok-here"
}One-click creation commands:
- Windows PowerShell:
$path = "$HOME\.claude"; if (!(Test-Path $path)) { New-Item -ItemType Directory -Path $path -Force }; Set-Content -Path "$path\config.json" -Value '{"primaryApiKey": "any-string-is-ok-here"}'- macOS / Linux:
mkdir -p ~/.claude && echo '{"primaryApiKey": "any-string-is-ok-here"}' > ~/.claude/config.json1.4 Skip the onboarding (add .claude.json)
Create a .claude.json file in your home directory with the following content:

{
"hasCompletedOnboarding": true
}One-click for Windows (requires Node.js installed):
node --eval "
const os = require('os');
const path = require('path');
const fs = require('fs');
const homeDir = os.homedir();
const filePath = path.join(homeDir, '.claude.json');
if (fs.existsSync(filePath)) {
const content = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
fs.writeFileSync(filePath, JSON.stringify({ ...content, hasCompletedOnboarding: true }, null, 2), 'utf-8');
} else {
fs.writeFileSync(filePath, JSON.stringify({ hasCompletedOnboarding: true }, null, 2), 'utf-8');
}"At this point, the terminal version of Claude Code is installed.
2. Use Claude Code in VS Code and configure third-party models
2.1 Install VS Code and the Claude Code YOLO plugin
Download and install the official VS Code version:
https://code.visualstudio.com/Open VS Code → Extensions marketplace (Ctrl+Shift+X) → search for Claude Code YOLO and install it.

The biggest advantage of this modified plugin is built-in third-party model configuration, with no dependence on official restrictions.
2.2 Launch Claude Code
After installation, a Claude icon appears in the top-right corner of VS Code. Click it to open the sidebar.

2.3 Recommended setting: switch to "Ask before edits" mode
This way the AI asks before modifying code, avoiding unexpected changes.

2.4 Configure the third-party model API
Type / in the Claude Code input box and select API configuration to open the model configuration page.

Using DeepSeek as an example:
Register and log in to the DeepSeek platform:
https://platform.deepseek.com/api_keysCreate an API Key.

- Fill in the following parameters on the plugin configuration page:

Common third-party model configuration examples (copy-paste ready):
- DeepSeek (recommended, excellent value):
- Base URL:
https://api.deepseek.com/v1 - API Key: your DeepSeek Key
- Model:
deepseek-R1
- Base URL:
After configuration, type anything in the input box to test. A normal AI response means success.
2.5 Verify the third-party model is working
In the Claude Code panel in VS Code or in the terminal, run the claude command and ask any programming question. Checking the response speed and quality confirms the third-party model switch succeeded.
Summary
With the steps above, you've installed the latest Claude Code and successfully connected third-party models. Compared with the official version, the YOLO plugin + third-party API combination significantly lowers cost and improves response speed — currently the most practical solution.
