安装部署Claude Code
1 安装Node.js
Claude Code 主要通过 npm 包分发,因此 Node.js 是必需项
1.1下载
node-js 下载:https://nodejs.org/en/download/

1.2 安装
直接next即可:
在这里插入图片描述

完成后,会自动安装很多依赖,比如Python等,要等一段时间:

1.3 安装后查看版本:
会报错,是因为Windows 默认禁止运行 .ps1 脚本,而 npm 在 PowerShell 里就是一个 npm.ps1 脚本;
配置一下即可:Set-ExecutionPolicy RemoteSigned -Force

1.4 配置镜像
可以在 ps窗口 中通过 npm config get registry 命令来查询 npm 所使用的镜像
默认使用的镜像是:https://registry.npmjs.org/,如果你 npm 所使用的镜像是这个的话,就换成国内的,比如:
(1)https://registry.npm.taobao.org/
(2)https://registry.npmmirror.com
可以通过 npm config set registry https://registry.npmmirror.com 这行命令将镜像设置为 https://registry.npmmirror.com 即可

2 安装git
-
下载网站
-
安装

一路next即可。
3 安装claude code
-
在powershell中运行npm 安装
shellnpm install -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com

- 查看版本:这个2.1.148版本已经是最新的版本了
shell
claude --version

-
可是连不上外网,因为Claude疯了国内IP,需要安装CC去配置一下其他模型厂商或者找中转代理

4 安装CC Switch
4.1下载安装CC
-
找到最新版本的下载win 64版本
-
安装:一路next即可
4.2 配置CC 添加模型
-
先要去模型厂商注册、申请key,比如deepseek、千问等
-
在CC上添加模型厂商并配置启用即可

4.3 再去打开Claude就不会报错了



5 让Claude Code先干个工程
5.1 告诉cc你的需求,越详细越好

5.2 开始干活了


5.3 干完了

5.4 打开工程验收

相当可以的
生成的项目设计文档也是相当的可以的
实在是太牛了