Codex CLI: The Practical Guide to OpenAI's Terminal Agent (2026)
Codex CLI is OpenAI's open-source coding agent that runs in your terminal: it reads, edits, and executes code in a selected directory, installs with one command via curl, npm, or Homebrew, and authenticates with either a ChatGPT plan or an API key. This guide is the hands-on reference for the CLI tool itself: install, config.toml, models, key commands, and MCP setup. For how the CLI fits alongside the Codex app, IDE extension, and cloud agent, see our broader OpenAI Codex ecosystem guide .