All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 33s
42 lines
934 B
Markdown
42 lines
934 B
Markdown
# 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 密钥。
|
||
|
||
## 手动配置说明
|
||
|
||
Codex 的配置文件通常位于 `~/.codex/config.toml`。
|
||
|
||
配置示例 (TOML):
|
||
|
||
```toml
|
||
[server]
|
||
url = "https://api2.xcodecli.com"
|
||
token = "sk-your-key-here"
|
||
|
||
[editor]
|
||
completion = true
|
||
```
|
||
|
||
## 注意事项
|
||
|
||
- Codex 需要支持 TOML 格式的配置文件。
|
||
- 确保你的编辑器插件已正确指向本地的 Codex 配置。
|