System Requirements
Ensure your system meets these minimum requirements before proceeding.
Rust Development Setup
The primary Codex CLI implementation is written in Rust and lives in thecodex-rs/ directory.
1
Clone the Repository
2
Install Rust Toolchain
Install Rust and required components:
3
Install Helper Tools
Install workspace helper tools:
4
Verify Installation
Build Codex to verify your setup:
TypeScript Development Setup
The legacy TypeScript CLI lives in thecodex-cli/ directory.
1
Navigate to CLI Directory
2
Enable Corepack
3
Install Dependencies
4
Linux-Only: Download Sandboxing Binaries
On Linux, download prebuilt sandboxing binaries (requires
gh and zstd):DotSlash (Optional)
GitHub Releases contain a DotSlash file for the Codex CLI namedcodex. Using a DotSlash file makes it possible to commit a lightweight reference to source control to ensure all contributors use the same version of an executable, regardless of platform.
Alternative: Nix Flake Development
Using Nix for reproducible builds
Using Nix for reproducible builds
Prerequisite: Nix >= 2.4 with flakes enabled (This shell includes Node.js (for TypeScript) or Rust toolchain, installs dependencies, builds the CLI, and provides a
experimental-features = nix-command flakes in ~/.config/nix/nix.conf).Enter Development Shell
codex command alias.Build Directly
Run via Flake App
Use with direnv
If you havedirenv installed, automatically enter the Nix shell when you cd into the project:Next Steps
Now that your environment is set up:Building
Learn how to build the project
Testing
Run tests to verify your setup
Guidelines
Review contribution guidelines
Configuration
Explore configuration options