core-agent-ide/codex-rs
Michael Bolin cf1d070538
feat: grab-bag of improvements to exec output (#1179)
Fixes:

* Instantiate `EventProcessor` earlier in `lib.rs` so
`print_config_summary()` can be an instance method of it and leverage
its various `Style` fields to ensure it honors `with_ansi` properly.
* After printing the config summary, print out user's prompt with the
heading `User instructions:`. As noted in the comment, now that we can
read the instructions via stdin as of #1178, it is helpful to the user
to ensure they know what instructions were given to Codex.
* Use same colors/bold/italic settings for headers as the TUI, making
the output a bit easier to read.
2025-05-30 16:22:10 -07:00
..
ansi-escape Update submodules version to come from the workspace (#850) 2025-05-07 10:08:06 -07:00
apply-patch fix: introduce ExtractHeredocError that implements PartialEq (#958) 2025-05-16 09:42:27 -07:00
cli feat: add support for -c/--config to override individual config items (#1137) 2025-05-27 23:11:44 -07:00
common fix(codex-rs): use codex-mini-latest as default (#1164) 2025-05-29 16:55:19 -07:00
core fix: introduce create_tools_json() and share it with chat_completions.rs (#1177) 2025-05-30 14:07:03 -07:00
docs feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629) 2025-04-24 13:31:40 -07:00
exec feat: grab-bag of improvements to exec output (#1179) 2025-05-30 16:22:10 -07:00
execpolicy Add codespell support (config, workflow to detect/not fix) and make it fix some typos (#903) 2025-05-14 09:39:49 -07:00
linux-sandbox fix: overhaul how we spawn commands under seccomp/landlock on Linux (#1086) 2025-05-23 11:37:07 -07:00
mcp-client fix: honor RUST_LOG in mcp-client CLI and default to DEBUG (#1149) 2025-05-28 17:10:06 -07:00
mcp-server feat: add support for -c/--config to override individual config items (#1137) 2025-05-27 23:11:44 -07:00
mcp-types Disallow expect via lints (#865) 2025-05-12 08:45:46 -07:00
scripts chore: script to create a Rust release (#759) 2025-04-30 12:39:03 -07:00
tui fix: update UI treatment of slash command menu to match that of the TS CLI (#1161) 2025-05-29 14:57:55 -07:00
.gitignore feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629) 2025-04-24 13:31:40 -07:00
Cargo.lock fix: introduce ResponseInputItem::McpToolCallOutput variant (#1151) 2025-05-28 19:03:17 -07:00
Cargo.toml fix: overhaul how we spawn commands under seccomp/landlock on Linux (#1086) 2025-05-23 11:37:07 -07:00
config.md docs: split the config-related portion of codex-rs/README.md into its own config.md file (#1165) 2025-05-29 16:59:35 -07:00
default.nix restructure flake for codex-rs (#888) 2025-05-13 13:08:42 -07:00
justfile fix: enable set positional-arguments in justfile (#1169) 2025-05-30 09:11:53 -07:00
README.md docs: split the config-related portion of codex-rs/README.md into its own config.md file (#1165) 2025-05-29 16:59:35 -07:00
rustfmt.toml Update cargo to 2024 edition (#842) 2025-05-07 08:37:48 -07:00

Codex CLI (Rust Implementation)

We provide Codex CLI as a standalone, native executable to ensure a zero-dependency install.

Installing Codex

Today, the easiest way to install Codex is via npm, though we plan to publish Codex to other package managers soon.

npm i -g @openai/codex@native
codex

You can also download a platform-specific release directly from our GitHub Releases.

Config

Codex supports a rich set of configuration options. See config.md for details.

Model Context Protocol Support

Codex CLI functions as an MCP client that can connect to MCP servers on startup. See the mcp_servers section in the configuration documentation for details.

It is still experimental, but you can also launch Codex as an MCP server by running codex mcp. Using the @modelcontextprotocol/inspector is

npx @modelcontextprotocol/inspector codex mcp

Code Organization

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

  • core/ contains the business logic for Codex. Ultimately, we hope this to be a library crate that is generally useful for building other Rust/native applications that use Codex.
  • exec/ "headless" CLI for use in automation.
  • tui/ CLI that launches a fullscreen TUI built with Ratatui.
  • cli/ CLI multitool that provides the aforementioned CLIs via subcommands.