Codex CLI

OpenAI's open-source Rust CLI coding agent that runs locally in your terminal.

Open Source Coding & Development
Visit Website ↗ by OpenAI

What is Codex CLI?

Codex CLI is OpenAI's official open-source coding agent: a Rust-built terminal tool that reads, edits, and executes code on your machine. It drives OpenAI's reasoning models through an agentic loop with sandboxed shell execution, file operations, and approval policies, and can act as both an MCP client and server. Sign in with a ChatGPT account or use an API key; it also ships as an IDE extension and desktop app.

Key features

  • Terminal-native agentic coding with TUI
  • Sandboxed execution (Seatbelt on macOS, Landlock on Linux)
  • Approval modes from suggest to full-auto
  • AGENTS.md project instructions
  • MCP client and server support
  • Headless exec mode for CI/CD

Watch: Codex CLI tutorial

How to Install And Use OpenAI Codex CLI How to Install And Use OpenAI Codex CLI — hUndefined

Video by hUndefined on YouTube — plays here without leaving this page.

Pros

  • Official OpenAI tool, very actively developed
  • Fast Rust binary
  • Strong sandboxing story

Cons

  • Best experience requires OpenAI models or a subscription
  • Open-source tool but model access is paid

Codex CLI at a glance

PricingOpen Source
CategoryCoding & Development
Platformsmacos, linux, windows
CompanyOpenAI
Official websitegithub.com
coding-agentcliopenairustterminal

How to choose the right Coding & Development tool

The right coding tool depends on where you write code and how much of your codebase it can understand. IDE integration is the first filter — a tool that lives in your editor, sees your project files and respects your stack will help far more than a general chatbot you paste snippets into. Look for accurate completions, clear explanations of suggested changes, and strong refactoring and debugging support for your main languages. Privacy deserves real attention: check whether your code is used for training, and whether a self-hosted or enterprise option exists for sensitive projects. Price against the hours it actually saves — most developers feel the difference within the first week of real use.

Compare all Coding & Development tools →

Codex CLI FAQs

What is Codex CLI?

Codex CLI is OpenAI's official open-source coding agent: a Rust-built terminal tool that reads, edits, and executes code on your machine. It drives OpenAI's reasoning models through an agentic loop with sandboxed shell execution, file operations, and approval policies, and can act as both an MCP client and server. Sign in with a ChatGPT account or use an API key; it also ships as an IDE extension and desktop app.

What are the main features of Codex CLI?

Codex CLI offers Terminal-native agentic coding with TUI, Sandboxed execution (Seatbelt on macOS, Landlock on Linux), Approval modes from suggest to full-auto, AGENTS.md project instructions, MCP client and server support and Headless exec mode for CI/CD.

How much does Codex CLI cost?

Codex CLI is open source, so the software itself is free to download, use and self-host. Your only costs are the infrastructure you run it on and any paid services you connect to it.

What are the pros and cons of Codex CLI?

Strengths of Codex CLI include Official OpenAI tool, very actively developed; Fast Rust binary; Strong sandboxing story. On the downside, Best experience requires OpenAI models or a subscription; Open-source tool but model access is paid.