openai/codex
codex
Lightweight coding agent that runs in your terminal
GitHub metrics
- Stars
- 136K
- +1.2K this week
- Forks
- 22K
- 30-day growth
- —
- Open issues
- 28K
| Day | GitHub stars |
|---|---|
| 2026-11-13 | 134951 |
| 2026-11-23 | 136171 |
What it does
Codex CLI is OpenAI's coding agent for the terminal: you start it inside a project folder, describe a task, and it reads files, edits them and runs commands on your own machine. The code is written in Rust and released under the Apache-2.0 license.
A session works like a conversation. The docs describe asking Codex to explain a codebase, plan a change, edit files and run local development tools, with commands and diffs shown as they happen. codex exec runs the agent without the interactive screen, for scripts and CI. A separate review mode reports findings on uncommitted changes, a commit or a base branch and leaves the working tree alone. Other documented options include codex resume for saved chats, image input, live web search, subagents and MCP servers.
On a local machine, an OS-enforced sandbox limits what the agent can touch, and an approval policy decides when it has to stop and ask. The defaults are no network access and write access limited to the active workspace. You sign in with a ChatGPT plan (the README lists Plus, Pro, Business, Edu and Enterprise) or with an OpenAI API key, which OpenAI bills at standard API rates. The same README points to an IDE extension, a desktop app and the cloud-based Codex Web as other ways to use Codex.
Why it matters
Codex CLI is built to work against a local repository: it inspects files, edits them and runs the tools already installed on the machine. The docs pair that access with controls. A sandbox enforced by the operating system sets what the agent can reach, an approval policy sets when it must ask first, and network access starts switched off. The source is public under Apache-2.0, so you can read how the agent behaves or build it yourself with Cargo.
Main features
- Interactive terminal sessions that read files, edit code and run commands locally
- Non-interactive runs for scripts and CI through `codex exec`
- Local code review of uncommitted changes, a commit or a base branch
- OS-enforced sandbox with configurable approval policies
- MCP server support through `codex mcp`
- Skills and plugins for repeatable instructions and outside tools
- Image input and optional live web search
- Subagents for delegating focused parts of a larger task
Who it's for
- Developers who work mainly in a terminal and want an agent inside the repository
- Teams that want to script an agent in CI with `codex exec`
- People on a ChatGPT Plus, Pro, Business, Edu or Enterprise plan who want to use it for coding
- Developers who want to read or build the agent's Rust source
Strengths
- Network access is off by default and writes are limited to the active workspace
- Several install routes: standalone installer, npm, Homebrew and prebuilt release binaries
- Works with an existing ChatGPT plan or with usage-based API key billing
- Source is public under Apache-2.0 and can be built from source with Cargo
Limitations
- Needs an OpenAI sign-in: a ChatGPT plan, or an API key billed at standard API rates
- With API key sign-in, some features that rely on ChatGPT workspace access or cloud services are limited or unavailable
- The repository's install guide lists Windows support as Windows 11 via WSL2
- The retired `untrusted` approval policy can stop the client from starting until it is removed from the configuration
Getting started
The README gives a standalone installer for macOS and Linux (the second command forces the download to come from GitHub Releases), plus npm and Homebrew packages. After installing, run codex in a project directory and sign in.
curl -fsSL https://chatgpt.com/codex/install.sh | sh
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh
npm install -g @openai/codex
brew install --cask codex
Requirements: macOS 12+, Ubuntu 20.04+/Debian 10+ or Windows 11 via WSL2; 4 GB RAM minimum (8 GB recommended); a ChatGPT plan or an OpenAI API key; Git 2.23+ is optional.
Always follow the official instructions in the README on GitHub. This overview is our summary, not a copy.
Sources
- GitHub - openai/codex: Lightweight coding agent that runs in your terminal · GitHubRepositoryPrimarygithub.com
- raw.githubusercontent.com/openai/codex/main/docs/install.mdWeb
- raw.githubusercontent.com/openai/codex/main/LICENSEWeb
- Codex CLI | ChatGPT LearnWeblearn.chatgpt.com
- learn.chatgpt.com/docs/agent-approvals-securityWeb
- learn.chatgpt.com/docs/authWeb




