Lightweight coding agent that runs in your terminal
open coreApache-2.0self-hostablefree
Codex is OpenAI's coding agent. The Codex CLI runs in the terminal, reads and edits code, and runs commands in a sandbox; the same agent is available as an extension for VS Code, Cursor and Windsurf, as a desktop app (codex app) and in ChatGPT on the web. Sign in with a ChatGPT Plus, Pro, Business, Edu or Enterprise plan to use it as part of the plan, or use an API key. The CLI is written in Rust and is open source under Apache-2.0.
Ways to install
Package managers
Problems it solves
- want an AI agent that edits my code and runs commands, using my existing ChatGPT subscription
- an open source terminal coding agent I can read and audit
- let an AI run commands in my repo without giving it free rein over my machine
- second-opinion code review of my branch from a different AI model
- hand off a coding task and come back to a finished diff
- coding agent in my editor that uses OpenAI's models
- run a coding agent unattended in a script or CI job
- reopen my last coding agent conversation in this folder and keep going, or pick an older one by ID
- get a terminal notification when the coding agent needs my approval or has finished its turn
- let the coding agent run some commands outside its sandbox without asking, prompt for others and forbid the rest
- make the coding agent propose an execution plan before it starts changing code
- check how many tokens my current coding agent session has used
- export my coding agent's API requests, token counts and approval decisions to OpenTelemetry
Features
- terminal CLI
- IDE extension (VS Code, Cursor, Windsurf)
- desktop app
- cloud tasks in ChatGPT
- sandboxed command execution
- sign in with ChatGPT or an API key
- standalone installers and GitHub release binaries
- codex resume and codex exec resume (--last, --all)
- plan mode (/plan)
- rules for commands outside the sandbox: allow, prompt or forbidden
View 3 more
- approval policies and sandbox modes (read-only, workspace-write, danger-full-access)
- TUI notifications and a notify program on turn completion
- /status token usage and OpenTelemetry log export
Capabilities
| Has a command line tool | plan not known |
|---|
Forks
- Open Interpreter Terminal coding agent tuned for low-cost and open models. Its own project.
Alternatives
The same job
These do what Codex does.
- OpenCode The open source coding agent.
- Codewhale Open source terminal coding agent for any model
- Gemini CLI An open-source AI agent that brings the power of Gemini directly into your terminal.
- Aider AI pair programming in your terminal
- Claude Code An agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools
- Cursor Cursor is your coding agent for building ambitious software.
