Skip to Content
ZhCLI 工具配置Codex 安装配置

Codex 安装配置

Codex 是 OpenAI 官方提供的命令行工具,通过 Cubence 平台可以使用 GPT-5 等强大模型。


安装

npm install -g @openai/codex

配置

1. 进入用户目录下的 .codex 文件夹:C:\Users\你的用户名\.codex

注意

如果看不到该文件夹,需要在资源管理器中开启”显示隐藏的项目”。如果没有该文件夹,需要手动创建。

2. 创建 config.toml 文件:

model_provider = "cubence" model = "gpt-5" model_reasoning_effort = "high" disable_response_storage = true [model_providers.cubence] name = "cubence" base_url = "https://api.cubence.com/v1" wire_api = "responses" requires_openai_auth = true

3. 创建 auth.json 文件:

{ "OPENAI_API_KEY": "echo your-api-key-here" }

请将 your-api-key-here 替换为 Cubence 平台创建的 API Key。

4. 在终端运行 codex 验证配置。


遇到问题?

查看 常见问题 文档,或加入 Cubence 官方 QQ 群  获取支持。

Last updated on