cli/reference.md +41 −2
18| `--cd, -C` | `path` | Set the working directory for the agent before it starts processing your request. |18| `--cd, -C` | `path` | Set the working directory for the agent before it starts processing your request. |
19| `--config, -c` | `key=value` | Override configuration values. Values parse as JSON if possible; otherwise the literal string is used. |19| `--config, -c` | `key=value` | Override configuration values. Values parse as JSON if possible; otherwise the literal string is used. |
20| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |20| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Run every command without approvals or sandboxing. Only use inside an externally hardened environment. |
21| `--dangerously-bypass-hook-trust` | `boolean` | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |
21| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. |22| `--disable` | `feature` | Force-disable a feature flag (translates to `-c features.<name>=false`). Repeatable. |
22| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. |23| `--enable` | `feature` | Force-enable a feature flag (translates to `-c features.<name>=true`). Repeatable. |
23| `--image, -i` | `path[,path...]` | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. |24| `--image, -i` | `path[,path...]` | Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag. |
93 94
94Key95Key
95 96
97`--dangerously-bypass-hook-trust`
98
99Type / Values
100
101`boolean`
102
103Details
104
105Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.
106
107Key
108
96`--disable`109`--disable`
97 110
98Type / Values111Type / Values
264| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |277| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |
265| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |278| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |
266| [`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server) | Experimental | Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex. |279| [`codex mcp-server`](https://developers.openai.com/codex/cli/reference#codex-mcp-server) | Experimental | Run Codex itself as an MCP server over stdio. Useful when another agent consumes Codex. |
267280| [`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, upgrade, or remove plugin marketplaces from Git or local sources. || [`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, list, upgrade, or remove plugin marketplaces from Git or local sources. |
268| [`codex remote-control`](https://developers.openai.com/codex/cli/reference#codex-remote-control) | Experimental | Ensure the local app-server daemon is running with remote-control support enabled. |281| [`codex remote-control`](https://developers.openai.com/codex/cli/reference#codex-remote-control) | Experimental | Ensure the local app-server daemon is running with remote-control support enabled. |
269| [`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume) | Stable | Continue a previous interactive session by ID or resume the most recent conversation. |282| [`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume) | Stable | Continue a previous interactive session by ID or resume the most recent conversation. |
270| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes. |283| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes. |
472 485
473Details486Details
474 487
475488Add, upgrade, or remove plugin marketplaces from Git or local sources.Add, list, upgrade, or remove plugin marketplaces from Git or local sources.
476 489
477Key490Key
478 491
939| `--cd, -C` | `path` | Set the workspace root before executing the task. |952| `--cd, -C` | `path` | Set the workspace root before executing the task. |
940| `--color` | `always | never | auto` | Control ANSI color in stdout. |953| `--color` | `always | never | auto` | Control ANSI color in stdout. |
941| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |954| `--dangerously-bypass-approvals-and-sandbox, --yolo` | `boolean` | Bypass approval prompts and sandboxing. Dangerous—only use inside an isolated runner. |
955| `--dangerously-bypass-hook-trust` | `boolean` | Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources. |
942| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |956| `--ephemeral` | `boolean` | Run without persisting session rollout files to disk. |
943| `--full-auto` | `boolean` | Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used. |957| `--full-auto` | `boolean` | Deprecated compatibility flag. Prefer `--sandbox workspace-write`; Codex prints a warning when this flag is used. |
944| `--ignore-rules` | `boolean` | Do not load user or project execpolicy `.rules` files for this run. |958| `--ignore-rules` | `boolean` | Do not load user or project execpolicy `.rules` files for this run. |
994 1008
995Key1009Key
996 1010
1011`--dangerously-bypass-hook-trust`
1012
1013Type / Values
1014
1015`boolean`
1016
1017Details
1018
1019Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.
1020
1021Key
1022
997`--ephemeral`1023`--ephemeral`
998 1024
999Type / Values1025Type / Values
1510| Key | Type / Values | Details |1536| Key | Type / Values | Details |
1511| --- | --- | --- |1537| --- | --- | --- |
1512| `add <source>` | `[--ref REF] [--sparse PATH]` | Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated. |1538| `add <source>` | `[--ref REF] [--sparse PATH]` | Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. `--sparse` is supported only for Git sources and can be repeated. |
1539| `list` | | Show plugin marketplaces Codex is currently considering and the root path for each marketplace. |
1513| `remove <marketplace-name>` | | Remove a configured plugin marketplace. |1540| `remove <marketplace-name>` | | Remove a configured plugin marketplace. |
1514| `upgrade [marketplace-name]` | | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |1541| `upgrade [marketplace-name]` | | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |
1515 1542
1527 1554
1528Key1555Key
1529 1556
1557`list`
1558
1559Details
1560
1561Show plugin marketplaces Codex is currently considering and the root path for each marketplace.
1562
1563Key
1564
1530`remove <marketplace-name>`1565`remove <marketplace-name>`
1531 1566
1532Details1567Details
1546root directories. Use `--ref` to pin a Git ref, and repeat `--sparse PATH` to1581root directories. Use `--ref` to pin a Git ref, and repeat `--sparse PATH` to
1547use a sparse checkout for Git-backed marketplace repositories.1582use a sparse checkout for Git-backed marketplace repositories.
1548 1583
1584`codex plugin marketplace list` prints in-scope marketplace names and roots,
1585including implicitly discovered default marketplaces and configured marketplace
1586snapshots.
1587
1549### `codex mcp-server`1588### `codex mcp-server`
1550 1589
1551Run Codex as an MCP server over stdio so that other tools can connect. This command inherits global configuration overrides and exits when the downstream client closes the connection.1590Run Codex as an MCP server over stdio so that other tools can connect. This command inherits global configuration overrides and exits when the downstream client closes the connection.