> ## 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

> Configure Codex CLI, local ~/.codex/ auth, custom models, and the sandbox.

Codex uses Codex CLI / app-server capabilities. Config is usually written to `~/.codex/`. You can also authorize reading files you already have locally.

## How to connect

Open **Settings → CLI configuration → Codex CLI**:

1. Add a Codex provider (`config.toml` + `auth.json`). Saving writes `~/.codex/`
2. Or use existing local `~/.codex/config.toml` and `auth.json`
3. For a subscription account, run `codex login` in a terminal first
4. If `codex` is not installed, click **Install** on that page
5. You can override the Codex CLI path

## Install

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

For a subscription account, also run `codex login`. Docs: [Codex CLI](https://learn.chatgpt.com/docs/codex/cli)

## Custom models

You can add a model ID, display name, and context window, plus message / MCP environment variables.

## Differences from Claude

| Capability                   | Codex                                                               |
| ---------------------------- | ------------------------------------------------------------------- |
| Plan mode                    | Shown as collaboration / sandbox modes; not the same as Claude plan |
| Skills                       | Supports `$`-style skills                                           |
| Rewind / fork                | Available when the runtime supports it                              |
| Fast / collaboration options | Visible in the input or Settings                                    |

## Usage stats

Cost estimates are accurate only after you add a unit price for the model. The monthly budget threshold is a local visual reminder. It does not stop the runtime.

## Next steps

* [Provider overview](/en/desktop/providers/overview)
* [Detect and install](/en/desktop/providers/cli)
* [Send the first message](/en/desktop/start/first-task)
