二、安装
下载基础软件(vscode,node,git)
(必选)vscode
https://code.visualstudio.com/
(必选)node
https://nodejs.org/zh-cn/download
(非必选)git
https://git-scm.com/download
安装核心 命令行
(三选一)cluade-code
npm install -g @anthropic-ai/claude-code
(三选一)codex
npm install -g @openai/codex
(三选一)gemini
npm install -g @google/gemini-cli
vscode插件
中文插件和三个ai的插件
其中gemini需要
登录需要开全局模式,加上命令行输入代理指令
在命令行中的使用
命令行中代理设置
win10/win11
cmd 中的命令
set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890
powershell 中的命令
$env:http_proxy = "http://127.0.0.1:7890"
$env:https_proxy = "http://127.0.0.1:7890"
Linux/macOS 中的命令
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
一些异常情况
在vscode中执行命令出现异常
claude:无法加载文件C:\xxxxx\AppData\Roaming\npm\claude.ps1,因为在此系统上禁止运行脚本。有关详细 信息,请参阅https:/go.microsoft.com/fwlink/?LinkID:=I3517g中的about_Execution_Policies。 所在位置行:1字符:1 claude CategoryInfo SecurityError:(:)[]PSSecurityException FullyQualifiedErrorId UnauthorizedAccess
解决方法:
在vscode的命令行中执行如下2个命令。2个命令要分开执行,不要一起复制进去了。
Set-ExecutionPolicy -Scope CurrentUser
RemoteSigned
执行codex
To use all Codex features,we recommend running Codex in Windows Subsystem for Linux (WSL2) WSL allows Codex to run Agent mode in a sandboxed environment with better data protections in place. Learn more:https://developers.openai.com/codex/windows
1.Exit and install WSL2
2.Continue anyway
Press Enter to continue
解决方法:
选择2。我们用codex不需要安装wsl2。