Codex CLI

OpenAI's open-source coding agent for the terminal — works on your local repo inside an OS sandbox; part of the Codex family with IDE, desktop and cloud.

Codex CLI is OpenAI's open-source (Apache-2.0) coding agent, written in Rust. It works on your local repository — inspecting files, editing code and running commands inside a local OS-level sandbox, with approval modes that decide when it may edit or execute without asking. Project instructions live in AGENTS.md (create one with /init); MCP servers, skills and plugins extend it, and codex exec runs it non-interactively in scripts and CI. The wider Codex product adds an IDE extension, a desktop app and cloud tasks (codex cloud). Sign in with a ChatGPT plan, where Codex is included, or use an API key. OpenAI models by default; open models via Ollama (--oss) and custom providers are also supported.

When to use

  • You already pay for ChatGPT and want a terminal coding agent included in the plan
  • You want an open-source agent with a local sandbox and explicit approval modes
  • Scripted or CI automation with codex exec

When not to use

  • You want an IDE-first experience with inline completions (Cursor, Copilot)
  • You want non-OpenAI models as a first-class option — OpenAI models are the default and best supported

At a glance

Pricing
Freemium
Deployment
Hybrid
Difficulty
Beginner
License
Apache-2.0
Languages
rust
Use cases
agentic coding, code review, cli tool
Last verified
2026-10-20 (official documentation)

Works well with

Alternatives in this category

See all 11 tools in AI Coding Agents — AI-Powered Coding Tools →

⚖️ Compare AI Coding Agents

Sources

v7.0