Codex
首先查看 node 版本,要求版本 ≥ 20.0.0
node -v
安装
npm install -g @openai/codex
运行
cd /path/to/the/project
codex
注意:使用官方服务需要订阅付费或开通API服务,也可参考下面自定义配置,Windows系统的配置文件位于 %USERPROFILE%/.codex/config.toml
使用 codex --profile veloera 指定供应商,未指定时使用 openrouter
model_provider = "openrouter"
model = "gpt-5"
[profiles.kilo]
model_provider = "kilo"
model = "openai/gpt-5"
[profiles.openrouter]
model_provider = "openrouter"
model = "openrouter/sonoma-sky-alpha"
[model_providers.kilo]
name = "kilo"
base_url = "http://127.0.0.1:9000/v1"
wire_api = "chat"
model_reasoning_effort = "high"
http_headers = { "Authorization" = "Bearer your_api_key" }
[model_providers.openrouter]
name = "OpenRouter"
base_url = "https://openrouter.ai/api/v1"
wire_api = "chat"
http_headers = { "Authorization" = "Bearer your_api_key" }
Gemini-CLI
首先查看 node 版本,要求版本 ≥ 20.0.0
node -v
临时安装
npx https://github.com/google-gemini/gemini-cli
永久安装
npm install -g @google/gemini-cli
有三种认证方式
-
使用Google账户
在打开的浏览器页面登录认证授权
-
使用Gemini-Key
Windows系统:
%USERPROFILE%/.gemini/.envGEMINI_API_KEY="AIzaSy********************" GOOGLE_GEMINI_BASE_URL="http://api.xxx.xxx" -
使用Vertex
Windows系统:
%USERPROFILE%/.gemini/.envGOOGLE_CLOUD_PROJECT="xxx-xxx-xxx" GOOGLE_CLOUD_LOCATION="us-central1" GOOGLE_VERTEX_BASE_URL="http://api.xxx.xxx"
运行
cd /path/to/the/project
gemini
Claude Code
首先查看 node 版本,要求版本 ≥ 18.0.0
node -v
安装
npm install -g @anthropic-ai/claude-code
运行
cd /path/to/the/project
claude
iFlow-CLI
安装
npm i -g @iflow-ai/iflow-cli
运行
cd /path/to/the/project
iflow