Private
Public Access
1
0
Files
xcodecli-shells/docs/guide/codex.md
sususu98 7c4d947400
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 1m4s
docs: 更新 API 分组说明、客户端推荐及重启终端提醒
- 文档新增 ccmax/cc2api 分组说明:cc2api 推荐优先使用(Claude 系列,无客户端限制),ccmax 仅限 Claude Code
- 推荐 OpenCode、OpenClaw 作为 cc2api 客户端,GPT 模型推荐 v1/responses 端点
- Cherry Studio 兼容性说明更新:支持所有模型,仅 ccmax 分组 Claude 模型不可用
- 所有脚本重启终端提示改为中文
- 三个工具文档页及快速开始页添加重启终端 warning 框
2026-02-25 17:13:22 +08:00

48 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Codex 配置指南
Codex 是一个强大的代码生成和补全工具。
## 快速安装与配置
使用下面的单一行命令即可自动完成安装和配置。
::: code-group
```bash [macOS / Linux]
API_KEY='你的密钥' bash -c "$(curl -fsSL https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/codex/setup-codex.sh)"
```
```powershell [Windows]
$key='你的密钥'; iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/codex/setup-codex.ps1 | iex
```
:::
> 请将命令中的 `你的密钥` 替换为你的实际 API 密钥。
::: warning ⚠️ 配置完成后请重启终端
脚本会自动配置环境变量,但需要**重启终端**才能生效。
- **macOS / Linux**:重新打开终端,或执行 `source ~/.zshrc`(或 `source ~/.bashrc`
- **Windows**:重新打开 PowerShell 窗口
:::
## 手动配置说明
Codex 的配置文件通常位于 `~/.codex/config.toml`。
配置示例 (TOML)
```toml
[server]
url = "https://api2.xcodecli.com"
token = "sk-your-key-here"
[editor]
completion = true
```
## 注意事项
- Codex 需要支持 TOML 格式的配置文件。
- 确保你的编辑器插件已正确指向本地的 Codex 配置。