OpenAI Codex CLI icon

OpenAI Codex CLI

OpenAI's open source coding agent that runs in your terminal with your own API key.

8.8 / 10
Terminal Agents
Free plan
from Free (BYOK OpenAI API or ChatGPT Plus/Pro quota)
Visit OpenAI Codex CLI

Description

OpenAI Codex CLI is OpenAI's coding agent that runs locally in the terminal, open source and actively maintained (v0.120.0 as of April 2026). It's written mainly in Rust, installs via 'npm install -g @openai/codex' or 'brew install --cask codex', and supports macOS, Linux, and Windows via WSL. It lets you chat with the agent to read the repo, edit files, run commands in a configurable sandbox, and validate changes, with support for AGENTS.md, skills in .codex/skills, MCP servers, and multi-step plans. It authenticates with a ChatGPT Plus/Pro/Business/Enterprise account or with your own OpenAI API key (BYOK), making it free as software (you only pay API usage or use your ChatGPT plan quota). It's OpenAI's official alternative to Claude Code, Cursor CLI, or Aider.

Preview

OpenAI Codex CLI interface

Detailed Evaluation

Ease of Use8.0
Code Quality8.8
Development Speed8.5
Flexibility9.2
Value for Money9.0
AI Power9.0

Key strengths

  • OpenAI's official open source agent

    Code on GitHub, open to contributions, with frequent releases (v0.120.0 in April 2026) and actively maintained by the OpenAI team.

  • Two authentication models

    You can use your ChatGPT Plus/Pro/Business/Enterprise account without paying for the API separately, or bring your own API key for isolated billing.

  • Configurable sandbox

    Control what the agent can read, write, and execute, with adjustable approval modes to balance speed and safety.

  • AGENTS.md and local skills

    You can instruct the agent at the repo level with AGENTS.md and define reusable skills in .codex/skills, just like other modern agents.

  • Native MCP

    Model Context Protocol is supported out of the box, letting you plug tools like Supabase, GitHub, Linear, or Notion without friction.

Limitations to consider

  • Less mature than Claude Code

    Claude Code has been in the terminal longer and has a slightly more developed ecosystem of skills and hooks than Codex CLI.

  • Non-trivial API cost

    If you use BYOK with top models, tokens add up fast; without a ChatGPT quota included, long sessions can get expensive.

  • CLI-only

    There's no graphical UI or native VS Code integration; if you want an IDE, look at Cursor or Windsurf.

  • Coexists with OpenAI Agents SDK

    OpenAI's strategy mixes Agents SDK (framework) and Codex CLI (product), which can create confusion about which to use when.

Standout Feature

Being the only OpenAI-backed CLI agent, open source and with dual authentication (ChatGPT account or BYOK), which makes it the natural choice for anyone who wants an official agent with no black box and aligned with OpenAI's latest models.

Comparison with Alternatives

Versus Claude Code it's less polished on skills but aligned with OpenAI; versus Cursor it offers a pure open source CLI experience, no IDE; versus Aider it has better MCP integration, official support, and much more frequent releases.

Ideal User

Advanced developers who work in the terminal, want an official open source OpenAI agent, care about controlling the sandbox and skills, and already pay for a ChatGPT plan they can draw quota from. Also a fit for teams that prefer BYOK to separate spend by project.

Learning Curve

Medium

Install and first commands are simple, but mastering AGENTS.md, skills, MCP servers, and sandbox policies takes reading docs and experimenting. Developers with prior Claude Code or Aider experience will adapt in hours.

Best For

  • Developers who live in the terminal and want an official OpenAI agent
  • Teams already paying for ChatGPT Plus/Business who want to leverage their quota
  • Projects that need to control the execution sandbox and write policies
  • Integrations with MCP servers and local skill definitions
  • Users who prefer an open source tool over a closed black box

Not Ideal For

  • People who prefer a graphical IDE over a CLI
  • Teams that need enterprise support with an SLA on the tool
  • Users who don't want to manage any file-based configuration

Technical Details

Languages

Any language supported by GPT-5 and successor models
Implemented in Rust, TypeScript, and Python

Frameworks

Works on any repo
Native MCP integration

Deployment

npm i -g @openai/codex
brew install --cask codex
GitHub Releases binaries (macOS, Linux)
CI via GitHub Actions
Launch:2025
Last updated:2026-04
Status:
Active
Try OpenAI Codex CLI