跳转至

CodeX CLI 配置

CodeX CLI 是 OpenAI 推出的命令行编程助手。

第一步:安装 Node.js

访问 nodejs.org 下载 LTS 版本的安装包,按默认设置安装。

验证安装:

node --version
npm --version

第二步:安装 CodeX CLI

npm install -g @openai/codex

第三步:编辑配置

路径:~/.codex/config.toml

model_provider = "shihaixiong"
model = "claude-sonnet-4-6"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true

[model_providers.shihaixiong]
name = "shihaixiong"
base_url = "https://www.cckeys.top/v1"
wire_api = "responses"
requires_openai_auth = true

第四步:认证配置

{
  "OPENAI_API_KEY": "sk-你的密钥"
}

第五步:启动

codex