Skip to content

Commit b73426c

Browse files
authored
docs: update codex-rs/README.md to list new features in the Rust CLI (openai#1267)
Let users know about what the Rust CLI supports that the TypeScript CLI doesn't!
1 parent 345a385 commit b73426c

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

codex-rs/README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,52 @@ codex
1313

1414
You can also download a platform-specific release directly from our [GitHub Releases](https://github.com/openai/codex/releases).
1515

16-
## Config
16+
## What's new in the Rust CLI
1717

18-
Codex supports a rich set of configuration options. See [`config.md`](./config.md) for details.
18+
While we are [working to close the gap between the TypeScript and Rust implementations of Codex CLI](https://github.com/openai/codex/issues/1262), note that the Rust CLI has a number of features that the TypeScript CLI does not!
1919

20-
## Model Context Protocol Support
20+
### Config
21+
22+
Codex supports a rich set of configuration options. Note that the Rust CLI uses `config.toml` instead of `config.json`. See [`config.md`](./config.md) for details.
23+
24+
### Model Context Protocol Support
2125

2226
Codex CLI functions as an MCP client that can connect to MCP servers on startup. See the [`mcp_servers`](./config.md#mcp_servers) section in the configuration documentation for details.
2327

24-
It is still experimental, but you can also launch Codex as an MCP _server_ by running `codex mcp`. Using the [`@modelcontextprotocol/inspector`](https://github.com/modelcontextprotocol/inspector) is
28+
It is still experimental, but you can also launch Codex as an MCP _server_ by running `codex mcp`. Use the [`@modelcontextprotocol/inspector`](https://github.com/modelcontextprotocol/inspector) to try it out:
2529

2630
```shell
2731
npx @modelcontextprotocol/inspector codex mcp
2832
```
2933

34+
### Notifications
35+
36+
You can enable notifications by configuring a script that is run whenever the agent finishes a turn. The [notify documentation](./config.md#notify) includes a detailed example that explains how to get desktop notifications via [terminal-notifier](https://github.com/julienXX/terminal-notifier) on macOS.
37+
38+
### `codex exec` to run Codex programmatially/non-interactively
39+
40+
To run Codex non-interactively, run `codex exec PROMPT` (you can also pass the prompt via `stdin`) and Codex will work on your task until it decides that it is done and exits. Output is printed to the terminal directly. You can set the `RUST_LOG` environment variable to see more about what's going on.
41+
42+
### `--cd`/`-C` flag
43+
44+
Sometimes it is not convenient to `cd` to the directory you want Codex to use as the "working root" before running Codex. Fortunately, `codex` supports a `--cd` option so you can specify whatever folder you want. You can confirm that Codex is honoring `--cd` by double-checking the **workdir** it reports in the TUI at the start of a new session.
45+
46+
### Experimenting with the Codex Sandbox
47+
48+
To test to see what happens when a command is run under the sandbox provided by Codex, we provide the following subcommands in Codex CLI:
49+
50+
```
51+
# macOS
52+
codex debug seatbelt [-s SANDBOX_PERMISSION]... [COMMAND]...
53+
54+
# Linux
55+
codex debug landlock [-s SANDBOX_PERMISSION]... [COMMAND]...
56+
```
57+
58+
You can experiment with different values of `-s` to see what permissions the `COMMAND` needs to execute successfully.
59+
60+
Note that the exact API for the `-s` flag is currently in flux. See https://github.com/openai/codex/issues/1248 for details.
61+
3062
## Code Organization
3163

3264
This folder is the root of a Cargo workspace. It contains quite a bit of experimental code, but here are the key crates:

0 commit comments

Comments
 (0)