You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: subject docs/*.md to Prettier checks (#4645)
Apparently we were not running our `pnpm run prettier` check in CI, so
many files that were covered by the existing Prettier check were not
well-formatted.
This updates CI and formats the files.
Copy file name to clipboardExpand all lines: AGENTS.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,10 @@ In the codex-rs folder where the rust code lives:
14
14
- When writing tests, prefer comparing the equality of entire objects over fields one by one.
15
15
16
16
Run `just fmt` (in `codex-rs` directory) automatically after making Rust code changes; do not ask for approval to run it. Before finalizing a change to `codex-rs`, run `just fix -p <project>` (in `codex-rs` directory) to fix any linter issues in the code. Prefer scoping with `-p` to avoid slow workspace‑wide Clippy builds; only run `just fix` without `-p` if you changed shared crates. Additionally, run the tests:
17
+
17
18
1. Run the test for the specific project that was changed. For example, if changes were made in `codex-rs/tui`, run `cargo test -p codex-tui`.
18
19
2. Once those pass, if any changes were made in common, core, or protocol, run the complete test suite with `cargo test --all-features`.
19
-
When running interactively, ask the user before running `just fix` to finalize. `just fmt` does not require approval. project-specific or individual tests can be run without asking the user, but do ask the user before running the complete test suite.
20
+
When running interactively, ask the user before running `just fix` to finalize. `just fmt` does not require approval. project-specific or individual tests can be run without asking the user, but do ask the user before running the complete test suite.
- Prefer Stylize helpers: use "text".dim(), .bold(), .cyan(), .italic(), .underlined() instead of manual Style where possible.
36
38
- Prefer simple conversions: use "text".into() for spans and vec![…].into() for lines; when inference is ambiguous (e.g., Paragraph::new/Cell::from), use Line::from(spans) or Span::from(text).
37
39
- Computed styles: if the Style is computed at runtime, using `Span::styled` is OK (`Span::from(text).set_style(style)` is also acceptable).
@@ -43,6 +45,7 @@ See `codex-rs/tui/styles.md`.
43
45
- Compactness: prefer the form that stays on one line after rustfmt; if only one of Line::from(vec![…]) or vec![…].into() avoids wrapping, choose that. If both wrap, pick the one with fewer wrapped lines.
44
46
45
47
### Text wrapping
48
+
46
49
- Always use textwrap::wrap to wrap plain strings.
47
50
- If you have a ratatui Line and you want to wrap it, use the helpers in tui/src/wrapping.rs, e.g. word_wrap_lines / word_wrap_line.
48
51
- If you need to indent wrapped lines, use the initial_indent / subsequent_indent options from RtOptions if you can, rather than writing custom logic.
@@ -64,6 +67,7 @@ This repo uses snapshot tests (via `insta`), especially in `codex-rs/tui`, to va
Copy file name to clipboardExpand all lines: README.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,3 @@
1
-
2
1
<palign="center"><code>npm i -g @openai/codex</code><br />or <code>brew install codex</code></p>
3
2
4
3
<palign="center"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer.
@@ -64,7 +63,6 @@ You can also use Codex with an API key, but this requires [additional setup](./d
64
63
65
64
Codex CLI supports [MCP servers](./docs/advanced.md#model-context-protocol-mcp). Enable by adding an `mcp_servers` section to your `~/.codex/config.toml`.
66
65
67
-
68
66
### Configuration
69
67
70
68
Codex CLI supports a rich set of configuration options, with preferences stored in `~/.codex/config.toml`. For full configuration options, see [Configuration](./docs/config.md).
Copy file name to clipboardExpand all lines: docs/advanced.md
+19-16Lines changed: 19 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,35 +31,38 @@ env = { "API_KEY" = "value" }
31
31
The Codex CLI can also be run as an MCP _server_ via `codex mcp-server`. For example, you can use `codex mcp-server` to make Codex available as a tool inside of a multi-agent framework like the OpenAI [Agents SDK](https://platform.openai.com/docs/guides/agents). Use `codex mcp` separately to add/list/get/remove MCP server launchers in your configuration.
32
32
33
33
### Codex MCP Server Quickstart
34
+
34
35
You can launch a Codex MCP server with the [Model Context Protocol Inspector](https://modelcontextprotocol.io/legacy/tools/inspector):
**`prompt`** (required) | string | The initial user prompt to start the Codex conversation.
46
-
`approval-policy` | string | Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `never`.
47
-
`base-instructions` | string | The set of instructions to use instead of the default ones.
48
-
`config` | object | Individual [config settings](https://github.com/openai/codex/blob/main/docs/config.md#config) that will override what is in `$CODEX_HOME/config.toml`.
49
-
`cwd` | string | Working directory for the session. If relative, resolved against the server process's current directory.
50
-
`include-plan-tool` | boolean | Whether to include the plan tool in the conversation.
51
-
`model` | string | Optional override for the model name (e.g. `o3`, `o4-mini`).
52
-
`profile` | string | Configuration profile from `config.toml` to specify default options.
53
-
`sandbox` | string | Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`.
|**`prompt`** (required) | string | The initial user prompt to start the Codex conversation.|
48
+
|`approval-policy`| string | Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `never`.|
49
+
|`base-instructions`| string | The set of instructions to use instead of the default ones.|
50
+
|`config`| object | Individual [config settings](https://github.com/openai/codex/blob/main/docs/config.md#config) that will override what is in `$CODEX_HOME/config.toml`.|
51
+
|`cwd`| string | Working directory for the session. If relative, resolved against the server process's current directory.|
52
+
|`include-plan-tool`| boolean | Whether to include the plan tool in the conversation.|
53
+
|`model`| string | Optional override for the model name (e.g. `o3`, `o4-mini`).|
54
+
|`profile`| string | Configuration profile from `config.toml` to specify default options.|
55
+
|`sandbox`| string | Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`.|
54
56
55
57
**`codex-reply`** - Continue a Codex session by providing the conversation id and prompt. The `codex-reply` tool takes the following properties:
|**`prompt`** (required) | string | The next user prompt to continue the Codex conversation.|
62
+
|**`conversationId`** (required) | string | The id of the conversation to continue.|
61
63
62
64
### Trying it Out
65
+
63
66
> [!TIP]
64
67
> Codex often takes a few minutes to run. To accommodate this, adjust the MCP inspector's Request and Total timeouts to 600000ms (10 minutes) under ⛭ Configuration.
Copy file name to clipboardExpand all lines: docs/authentication.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,4 +65,4 @@ If you run Codex on a remote machine (VPS/server) without a local browser, the l
65
65
ssh -L 1455:localhost:1455 <user>@<remote-host>
66
66
```
67
67
68
-
Then, in that SSH session, run `codex` and select "Sign in with ChatGPT". When prompted, open the printed URL (it will be `http://localhost:1455/...`) in your local browser. The traffic will be tunneled to the remote server.
68
+
Then, in that SSH session, run `codex` and select "Sign in with ChatGPT". When prompted, open the printed URL (it will be `http://localhost:1455/...`) in your local browser. The traffic will be tunneled to the remote server.
0 commit comments