2025-05-30 09:11:53 -07:00
|
|
|
set positional-arguments
|
|
|
|
|
|
feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:
Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.
To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:
- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.
Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00
|
|
|
# Display help
|
|
|
|
|
help:
|
|
|
|
|
just -l
|
|
|
|
|
|
2025-05-29 15:35:14 -07:00
|
|
|
# `codex`
|
2025-09-26 18:24:01 -07:00
|
|
|
alias c := codex
|
2025-05-29 15:35:14 -07:00
|
|
|
codex *args:
|
2025-05-30 09:11:53 -07:00
|
|
|
cargo run --bin codex -- "$@"
|
feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:
Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.
To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:
- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.
Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00
|
|
|
|
2025-05-29 15:35:14 -07:00
|
|
|
# `codex exec`
|
|
|
|
|
exec *args:
|
2025-05-30 09:11:53 -07:00
|
|
|
cargo run --bin codex -- exec "$@"
|
2025-05-29 15:35:14 -07:00
|
|
|
|
|
|
|
|
# `codex tui`
|
feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:
Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.
To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:
- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.
Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00
|
|
|
tui *args:
|
2025-05-30 09:11:53 -07:00
|
|
|
cargo run --bin codex -- tui "$@"
|
feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629)
As stated in `codex-rs/README.md`:
Today, Codex CLI is written in TypeScript and requires Node.js 22+ to
run it. For a number of users, this runtime requirement inhibits
adoption: they would be better served by a standalone executable. As
maintainers, we want Codex to run efficiently in a wide range of
environments with minimal overhead. We also want to take advantage of
operating system-specific APIs to provide better sandboxing, where
possible.
To that end, we are moving forward with a Rust implementation of Codex
CLI contained in this folder, which has the following benefits:
- The CLI compiles to small, standalone, platform-specific binaries.
- Can make direct, native calls to
[seccomp](https://man7.org/linux/man-pages/man2/seccomp.2.html) and
[landlock](https://man7.org/linux/man-pages/man7/landlock.7.html) in
order to support sandboxing on Linux.
- No runtime garbage collection, resulting in lower memory consumption
and better, more predictable performance.
Currently, the Rust implementation is materially behind the TypeScript
implementation in functionality, so continue to use the TypeScript
implmentation for the time being. We will publish native executables via
GitHub Releases as soon as we feel the Rust version is usable.
2025-04-24 13:31:40 -07:00
|
|
|
|
2025-06-25 13:29:03 -07:00
|
|
|
# Run the CLI version of the file-search crate.
|
|
|
|
|
file-search *args:
|
|
|
|
|
cargo run --bin codex-file-search -- "$@"
|
|
|
|
|
|
2025-05-29 15:35:14 -07:00
|
|
|
# format code
|
|
|
|
|
fmt:
|
|
|
|
|
cargo fmt -- --config imports_granularity=Item
|
2025-07-17 11:40:00 -07:00
|
|
|
|
2025-08-20 09:57:55 -07:00
|
|
|
fix *args:
|
|
|
|
|
cargo clippy --fix --all-features --tests --allow-dirty "$@"
|
2025-07-17 11:40:00 -07:00
|
|
|
|
2025-09-26 18:24:01 -07:00
|
|
|
clippy:
|
|
|
|
|
cargo clippy --all-features --tests "$@"
|
|
|
|
|
|
2025-07-17 11:40:00 -07:00
|
|
|
install:
|
2025-07-17 15:36:15 -07:00
|
|
|
rustup show active-toolchain
|
2025-07-17 11:40:00 -07:00
|
|
|
cargo fetch
|
2025-09-03 17:05:03 -07:00
|
|
|
|
2025-09-12 08:44:44 -07:00
|
|
|
# Run `cargo nextest` since it's faster than `cargo test`, though including
|
|
|
|
|
# --no-fail-fast is important to ensure all tests are run.
|
|
|
|
|
#
|
|
|
|
|
# Run `cargo install cargo-nextest` if you don't have it installed.
|
|
|
|
|
test:
|
|
|
|
|
cargo nextest run --no-fail-fast
|
|
|
|
|
|
2025-09-03 17:05:03 -07:00
|
|
|
# Run the MCP server
|
|
|
|
|
mcp-server-run *args:
|
|
|
|
|
cargo run -p codex-mcp-server -- "$@"
|