> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mossx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> 配置 Codex CLI、本地 ~/.codex/ 授權、自訂模型與沙箱。

Codex 走 Codex CLI / app-server 能力。配置通常寫入 `~/.codex/`，也可以授權讀取你已有的本地檔案。

## 接入方式

開啟 **設定 → CLI配置管理 → Codex CLI**：

1. 新增 Codex 供應商（`config.toml` + `auth.json`），儲存後寫入 `~/.codex/`
2. 或使用本機已有的 `~/.codex/config.toml` 與 `auth.json`
3. 訂閱制賬號可先在終端 `codex login`
4. 未安裝 `codex` 時，可在該頁點 **安裝**
5. 可覆蓋 Codex CLI 路徑

## 安裝

```bash theme={null}
npm install -g @openai/codex
```

訂閱制賬號再執行 `codex login`。文件：[Codex CLI](https://learn.chatgpt.com/docs/codex/cli)

## 自訂模型

可追加模型 ID、顯示名、上下文視窗，並配置訊息 / MCP 相關環境變數。

## 和 Claude 的差異

| 能力          | Codex                          |
| ----------- | ------------------------------ |
| 規劃模式        | 以協作 / 沙箱模式呈現，不完全等同 Claude plan |
| Skills      | 支援 `$` 風格技能                    |
| 回退 / 分叉     | runtime 支援時可用                  |
| Fast / 協作選項 | 輸入框或設定中可見                      |

## 使用統計

給模型補上單價後，費用估算才準確。月度 budget threshold 只是本地視覺提醒，不會中斷 runtime。

## 下一步

* [多供應商總覽](/zh-Hant/desktop/providers/overview)
* [檢測與安裝](/zh-Hant/desktop/providers/cli)
* [發出第一條訊息](/zh-Hant/desktop/start/first-task)
