cli/reference.md +68 −10
262| Key | Maturity | Details |262| Key | Maturity | Details |
263| --- | --- | --- |263| --- | --- | --- |
264| [`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive) | Stable | Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. |264| [`codex`](https://developers.openai.com/codex/cli/reference#codex-interactive) | Stable | Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments. |
265265| [`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) | Stable | Launch the Codex desktop app on macOS, optionally opening a specific workspace path. || [`codex app`](https://developers.openai.com/codex/cli/reference#codex-app) | Stable | Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open. |
266| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging. |266| [`codex app-server`](https://developers.openai.com/codex/cli/reference#codex-app-server) | Experimental | Launch the Codex app server for local development or debugging. |
267| [`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply) | Stable | Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`. |267| [`codex apply`](https://developers.openai.com/codex/cli/reference#codex-apply) | Stable | Apply the latest diff generated by a Codex Cloud task to your local working tree. Alias: `codex a`. |
268| [`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud) | Experimental | Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`. |268| [`codex cloud`](https://developers.openai.com/codex/cli/reference#codex-cloud) | Experimental | Browse or execute Codex Cloud tasks from the terminal without opening the TUI. Alias: `codex cloud-tasks`. |
276| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |276| [`codex logout`](https://developers.openai.com/codex/cli/reference#codex-logout) | Stable | Remove stored authentication credentials. |
277| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |277| [`codex mcp`](https://developers.openai.com/codex/cli/reference#codex-mcp) | Experimental | Manage Model Context Protocol servers (list, add, remove, authenticate). |
278| [`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. |278| [`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 plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace) | Experimental | Add, upgrade, or remove plugin marketplaces from Git or local sources. |
279| [`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. |280| [`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. |
280281| [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS seatbelt or Linux sandboxes (Landlock by default, optional bubblewrap pipeline). || [`codex sandbox`](https://developers.openai.com/codex/cli/reference#codex-sandbox) | Experimental | Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes. |
281 282
282Key283Key
283 284
301 302
302Details303Details
303 304
304305Launch the Codex desktop app on macOS, optionally opening a specific workspace path.Launch the Codex desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.
305 306
306Key307Key
307 308
461 462
462Key463Key
463 464
465[`codex plugin marketplace`](https://developers.openai.com/codex/cli/reference#codex-plugin-marketplace)
466
467Maturity
468
469Experimental
470
471Details
472
473Add, upgrade, or remove plugin marketplaces from Git or local sources.
474
475Key
476
464[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume)477[`codex resume`](https://developers.openai.com/codex/cli/reference#codex-resume)
465 478
466Maturity479Maturity
481 494
482Details495Details
483 496
484497Run arbitrary commands inside Codex-provided macOS seatbelt or Linux sandboxes (Landlock by default, optional bubblewrap pipeline).Run arbitrary commands inside Codex-provided macOS seatbelt or Linux bubblewrap sandboxes.
485 498
486Expand to view all499Expand to view all
487 500
595 608
596### `codex app`609### `codex app`
597 610
598611Launch Codex Desktop from the terminal on macOS and optionally open a specific workspace path.Launch Codex Desktop from the terminal on macOS or Windows. On macOS, Codex can open a specific workspace path; on Windows, Codex prints the path to open.
599 612
600| Key | Type / Values | Details |613| Key | Type / Values | Details |
601| --- | --- | --- |614| --- | --- | --- |
602615| `--download-url` | `url` | Advanced override for the Codex desktop DMG download URL used during install. || `--download-url` | `url` | Advanced override for the Codex desktop installer URL used during install. |
603616| `PATH` | `path` | Workspace path to open in Codex Desktop (`codex app` is available on macOS only). || `PATH` | `path` | Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path. |
604 617
605Key618Key
606 619
612 625
613Details626Details
614 627
615628Advanced override for the Codex desktop DMG download URL used during install.Advanced override for the Codex desktop installer URL used during install.
616 629
617Key630Key
618 631
624 637
625Details638Details
626 639
627640Workspace path to open in Codex Desktop (`codex app` is available on macOS only).Workspace path for Codex Desktop. On macOS, Codex opens this path; on Windows, Codex prints the path.
628 641
629642`codex app` installs/opens the desktop app on macOS, then opens the provided workspace path. This subcommand is macOS-only.`codex app` opens an installed Codex Desktop app, or starts the installer when
643the app is missing. On macOS, Codex opens the provided workspace path; on
644Windows, it prints the path to open after installation.
630 645
631### `codex debug app-server send-message-v2`646### `codex debug app-server send-message-v2`
632 647
1381 1396
1382OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).1397OAuth actions (`login`, `logout`) only work with streamable HTTP servers (and only when the server supports OAuth).
1383 1398
1399### `codex plugin marketplace`
1400
1401Manage plugin marketplace sources that Codex can browse and install from.
1402
1403| Key | Type / Values | Details |
1404| --- | --- | --- |
1405| `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. |
1406| `remove <marketplace-name>` | | Remove a configured plugin marketplace. |
1407| `upgrade [marketplace-name]` | | Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided. |
1408
1409Key
1410
1411`add <source>`
1412
1413Type / Values
1414
1415`[--ref REF] [--sparse PATH]`
1416
1417Details
1418
1419Install 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.
1420
1421Key
1422
1423`remove <marketplace-name>`
1424
1425Details
1426
1427Remove a configured plugin marketplace.
1428
1429Key
1430
1431`upgrade [marketplace-name]`
1432
1433Details
1434
1435Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.
1436
1437`codex plugin marketplace add` accepts GitHub shorthand such as `owner/repo` or
1438`owner/repo@ref`, HTTP or HTTPS Git URLs, SSH Git URLs, and local marketplace
1439root directories. Use `--ref` to pin a Git ref, and repeat `--sparse PATH` to
1440use a sparse checkout for Git-backed marketplace repositories.
1441
1384### `codex mcp-server`1442### `codex mcp-server`
1385 1443
1386Run 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.1444Run 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.