codex

(โ˜… 110,839)

Lightweight coding agent that runs in your terminal

Showing a partial file list โ€” download the zip above to see everything.

  • .bazelignore
  • .bazelrc
  • .bazelversion
  • .codespellignore
  • .codespellrc
  • .gitattributes
  • .gitignore
  • .markdownlint-cli2.yaml
  • .npmrc
  • .prettierignore
  • .prettierrc.toml
  • .worktreeinclude
  • AGENTS.md
  • announcement_tip.toml
  • BUILD.bazel
  • CHANGELOG.md
  • LICENSE
  • MODULE.bazel
  • MODULE.bazel.lock
  • NOTICE
  • README.md
  • SECURITY.md

# Installation Guide

1. Get the code
git clone https://github.com/openai/codex

Downloads the entire project code from GitHub to your computer.

cd codex

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
Prerequisites
  • Node.js Node.js must be installed to use npm.
  • Homebrew A package manager for macOS/Linux.
curl -fsSL https://chatgpt.com/codex/install.sh | sh

Downloads and runs the official install script in one line โ€” this handles the full setup automatically.

npm install -g @openai/codex

Installs the package published on the npm registry globally โ€” no need to clone the source.

brew install --cask codex

Installs the pre-built package via Homebrew โ€” no source build required.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. Node.js

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
npm install -g @openai/codex

Installs the package published on the npm registry globally โ€” no need to clone the source.

โœ… After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

4. Rust

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Rust (rustup) Installing via rustup also installs cargo.
cd codex-rs

This project's files live in a subfolder, so move into it first.

cargo build --release

Compiles the Rust project.

cargo run

Builds and then immediately runs the program.

โœ… If cargo build finishes without errors, it worked. The executable is created under target/.
// repository documentation