01 / 09
教程
Claude Code
Claude Code
安装教程
从零开始,一步步在你的电脑上搭建 Claude Code 开发环境
步骤 9
耗时 ~20分钟
难度 入门
02 / 09
01
安装 Node.js
Claude Code 运行在 Node.js 上,需要先安装它。
macOS 用户也可用 brew install node
03 / 09
02
安装 Git
Git 是版本控制工具,Claude Code 依赖它来管理代码。
macOS 用户可用 brew install git
04 / 09
03
安装 VS Code
VS Code 是推荐使用的代码编辑器,Claude Code 可作为扩展运行。
05 / 09
04
准备 API 工具
CC Switch 是 Claude Code 的配置切换工具,配合 DeepSeek API 使用。
CC Switch
Release CC Switch v3.14.1
farion1231 / cc-switch
GitHub 搜索下载最新 Release
06 / 09
05
验证安装环境
打开终端(PowerShell 或 Terminal),运行以下命令确认安装成功:
PS> node --version
应输出版本号,如 v20.11.0
PS> git --version
应输出版本号,如 git version 2.43.0
07 / 09
06
安装 Claude Code
一条命令,全局安装 Claude Code CLI。
PS> npm install -g @anthropic-ai/claude-code
npm 是 Node.js 自带的包管理器,-g 表示全局安装
说明
安装完成后,在终端输入 claude 即可启动。首次启动会提示登录,按指引操作即可。
08 / 09
07
配置 API 并启动
使用 CC Switch 配置 DeepSeek API Key,然后就可以开始用了。
- 1 打开 CC Switch,填入你的 DeepSeek API Key
- 2 在 CC Switch 中选择 DeepSeek 作为 API 提供方
-
3
打开终端,输入
claude启动 - 4 开始与 Claude Code 对话!
09 / 09
✓ 安装完成!
✓ Node.js 运行环境
✓ Git 版本控制
✓ VS Code 编辑器
✓ CC Switch 工具
✓ DeepSeek API 注册
✓ 环境验证通过
✓ Claude Code CLI 安装
✓ API Key 配置完成