[//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [ts-rs](https://github.com/Aleph-Alpha/ts-rs) from 11.0.1 to 11.1.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Aleph-Alpha/ts-rs/releases">ts-rs's releases</a>.</em></p> <blockquote> <h2>v11.1.0</h2> <p>Today, we're happy to publish a small follow-up to v11.0.1!</p> <p>This release fixes a nasty build failure when using the <code>format</code> feature. <strong>Note:</strong> For those that use the <code>format</code> feature, this release bumps the MSRV to 1.88. We'd have preferred to do this in a major release, but felt this was acceptable since the build was broken by one of the dependencies anyway.</p> <h1>New features</h1> <h2>TypeScript enums with <code>#[ts(repr(enum))</code></h2> <p><code>#[ts(repr(enum))</code> instructs ts-rs to generate an <code>enum</code>, instead of a <code>type</code> for your rust enum.</p> <pre lang="rust"><code>#[derive(TS)] #[ts(repr(enum))] enum Role { User, Admin, } // will generate `export enum Role { "User", "Admin" }` </code></pre> <p>Discriminants are preserved, and you can use the variant's name as discriminant instead using <code>#[ts(repr(enum = name))]</code></p> <h2><code>#[ts(optional_fields)]</code> in enums</h2> <p>The <code>#[ts(optional_fields)]</code> attribute can now be applied directly to enums, or even to individual enum variants.</p> <h2>Control over file extensions in imports</h2> <p>Normally, we generate <code>import { Type } from "file"</code> statements. In some scenarios though, it might be necessary to use a <code>.ts</code> or even <code>.js</code> extension instead.<br /> This is now possible by setting the <code>TS_RS_IMPORT_EXTENSION</code> environment variable.</p> <blockquote> <p>Note: With the introduction of this feature, we deprecate the <code>import-esm</code> cargo feature. It will be removed in a future major release.</p> </blockquote> <h2>Full changelog</h2> <ul> <li>Regression: <code>#[ts(optional)]</code> with <code>#[ts(type)]</code> by <a href="https://github.com/NyxCode"><code>@NyxCode</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/416">Aleph-Alpha/ts-rs#416</a></li> <li>release v11.0.1 by <a href="https://github.com/NyxCode"><code>@NyxCode</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/417">Aleph-Alpha/ts-rs#417</a></li> <li>Make <code>rename_all</code> compatible with tuple and unit structs as a no-op attribute by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/422">Aleph-Alpha/ts-rs#422</a></li> <li>Replace <code>import-esm</code> with <code>TS_RS_IMPORT_EXTENSION</code> by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/423">Aleph-Alpha/ts-rs#423</a></li> <li>Updated chrono Duration emitted type by <a href="https://github.com/fxf8"><code>@fxf8</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">Aleph-Alpha/ts-rs#434</a></li> <li>Add optional_fields to enum by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/432">Aleph-Alpha/ts-rs#432</a></li> <li>Add <code>#[ts(repr(enum)]</code> attribute by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/425">Aleph-Alpha/ts-rs#425</a></li> <li>Fix build with <code>format</code> feature by <a href="https://github.com/gustavo-shigueo"><code>@gustavo-shigueo</code></a> in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/438">Aleph-Alpha/ts-rs#438</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/fxf8"><code>@fxf8</code></a> made their first contribution in <a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">Aleph-Alpha/ts-rs#434</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Aleph-Alpha/ts-rs/blob/main/CHANGELOG.md">ts-rs's changelog</a>.</em></p> <blockquote> <h1>11.1.0</h1> <h3>Features</h3> <ul> <li>Add <code>#[ts(repr(enum))]</code> attribute (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/425">#425</a>)</li> <li>Add support for <code>#[ts(optional_fields)]</code> in enums and enum variants (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/432">#432</a>)</li> <li>Deprecate <code>import-esm</code> cargo feature in favour of <code>RS_RS_IMPORT_EXTENSION</code> (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/423">#423</a>)</li> </ul> <h3>Fixes</h3> <ul> <li>Fix bindings for <code>chrono::Duration</code> (<a href="https://redirect.github.com/Aleph-Alpha/ts-rs/pull/434">#434</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Aleph-Alpha/ts-rs/commits/v11.1.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| .cargo | ||
| .config | ||
| .github/workflows | ||
| ansi-escape | ||
| app-server | ||
| app-server-protocol | ||
| app-server-test-client | ||
| apply-patch | ||
| arg0 | ||
| async-utils | ||
| backend-client | ||
| chatgpt | ||
| cli | ||
| cloud-tasks | ||
| cloud-tasks-client | ||
| codex-api | ||
| codex-backend-openapi-models | ||
| codex-client | ||
| common | ||
| core | ||
| debug-client | ||
| docs | ||
| exec | ||
| exec-server | ||
| execpolicy | ||
| execpolicy-legacy | ||
| feedback | ||
| file-search | ||
| keyring-store | ||
| linux-sandbox | ||
| lmstudio | ||
| login | ||
| mcp-server | ||
| mcp-types | ||
| ollama | ||
| otel | ||
| process-hardening | ||
| protocol | ||
| responses-api-proxy | ||
| rmcp-client | ||
| scripts | ||
| stdio-to-uds | ||
| tui | ||
| tui2 | ||
| utils | ||
| windows-sandbox-rs | ||
| .gitignore | ||
| BUILD.bazel | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| code | ||
| config.md | ||
| default.nix | ||
| deny.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
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:
npm i -g @openai/codex
codex
You can also install via Homebrew (brew install --cask codex) or download a platform-specific release directly from our GitHub Releases.
Documentation quickstart
- First run with Codex? Start with
docs/getting-started.md(links to the walkthrough for prompts, keyboard shortcuts, and session management). - Want deeper control? See
docs/config.mdanddocs/install.md.
What's new in the Rust CLI
The Rust implementation is now the maintained Codex CLI and serves as the default experience. It includes a number of features that the legacy TypeScript CLI never supported.
Config
Codex supports a rich set of configuration options. Note that the Rust CLI uses config.toml instead of config.json. See docs/config.md for details.
Model Context Protocol Support
MCP client
Codex CLI functions as an MCP client that allows the Codex CLI and IDE extension to connect to MCP servers on startup. See the configuration documentation for details.
MCP server (experimental)
Codex can be launched as an MCP server by running codex mcp-server. This allows other MCP clients to use Codex as a tool for another agent.
Use the @modelcontextprotocol/inspector to try it out:
npx @modelcontextprotocol/inspector codex mcp-server
Use codex mcp to add/list/get/remove MCP server launchers defined in config.toml, and codex mcp-server to run the MCP server directly.
Notifications
You can enable notifications by configuring a script that is run whenever the agent finishes a turn. The notify documentation includes a detailed example that explains how to get desktop notifications via terminal-notifier on macOS. When Codex detects that it is running under WSL 2 inside Windows Terminal (WT_SESSION is set), the TUI automatically falls back to native Windows toast notifications so approval prompts and completed turns surface even though Windows Terminal does not implement OSC 9.
codex exec to run Codex programmatically/non-interactively
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.
Experimenting with the Codex Sandbox
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:
# macOS
codex sandbox macos [--full-auto] [--log-denials] [COMMAND]...
# Linux
codex sandbox linux [--full-auto] [COMMAND]...
# Windows
codex sandbox windows [--full-auto] [COMMAND]...
# Legacy aliases
codex debug seatbelt [--full-auto] [--log-denials] [COMMAND]...
codex debug landlock [--full-auto] [COMMAND]...
Selecting a sandbox policy via --sandbox
The Rust CLI exposes a dedicated --sandbox (-s) flag that lets you pick the sandbox policy without having to reach for the generic -c/--config option:
# Run Codex with the default, read-only sandbox
codex --sandbox read-only
# Allow the agent to write within the current workspace while still blocking network access
codex --sandbox workspace-write
# Danger! Disable sandboxing entirely (only do this if you are already running in a container or other isolated env)
codex --sandbox danger-full-access
The same setting can be persisted in ~/.codex/config.toml via the top-level sandbox_mode = "MODE" key, e.g. sandbox_mode = "workspace-write".
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.