# codex

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> The Codex CLI, installed globally with npm.


Installs the Codex CLI (`codex`) as the global npm package `@openai/codex`.

```yaml
devtools:
  - name: nodejs
  - name: codex
```

That is the whole install; Codex runs with its own defaults. To set a model or add MCP
servers, add a [`codex` toolconfig](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/codex/). To sign
in, see [Sign in to a coding agent](https://docs-stg.ringleader.dev/workstations/coding-agents/coding-agent-setup/#sign-in-to-a-coding-agent).

## Version behavior

| `version` | Result |
|-----------|--------|
| omitted | the latest published release at the time of the first install |
| `0.5.0` | that exact npm version |

A workstation where `codex` runs keeps the release it has. A changed `version` replaces that
release on the next configuration pass. If `codex` is on the PATH but fails to run, Ringleader
installs it again.

## Updates

With `updatePolicy: latest` and no `version`, Codex takes the
[npm route](https://docs-stg.ringleader.dev/reference/tools/devtools/#update-routes): about once a day, it moves to the newest npm release. A Codex session that is already running keeps
its release, and the next session starts on the new one.

## Node.js

The recipe needs npm. [Node.js for coding agents](https://docs-stg.ringleader.dev/reference/tools/devtools/nodejs/#nodejs-for-coding-agents)
says which Node.js Codex runs on and what Ringleader installs when you declare none.

## Example

Node 24, both CLIs, and Codex told which model to use:

```yaml
devtools:
  - name: nodejs
    version: "24"
  - name: claude-code
  - name: codex
toolconfigs:
  - id: codex
    name: codex
    config:
      configToml: |
        model = "o4-mini"
```

Ringleader writes the settings in `configToml` to `~/.codex/config.toml` in the login
user's home without validating them, so anything Codex accepts in that file works here.
It manages only the settings you declare, so what Codex saves there itself survives. The
[`codex` toolconfig](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/codex/) page covers the
alternatives: the same settings as YAML, MCP servers, and trusted folders.

## Notes

- Unlike `claude-code`, installing `codex` does not set any permission default, because
  Codex ships with its own. A toolconfig is created for you only to pre-trust the
  workstation's working folders, and only when the workstation declares any.
- The binary lands on the system PATH.
- Works on Debian, Ubuntu, and Alpine.

