Loading lesson…
Codex CLI is OpenAI's terminal coding agent. It runs locally, supports MCP, and ships a codex cloud mode for background tasks. Let's install it and compare it honestly to Claude Code.
Codex CLI is OpenAI's lightweight coding agent. It runs in your terminal, inspects your repo, edits files, and executes shell commands. It ships on macOS, Windows, and Linux, and its premium models are included with ChatGPT Plus, Pro, and Business plans.
# Install via npm (macOS, Linux, Windows)
npm install -g @openai/codex
# Or via Homebrew on macOS
brew install openai/codex/codex
# Launch in your project directory
cd my-project
codex
# Type /model to pick a model
# Default in 2026: gpt-5.5 for complex work, gpt-5.3-codex for fast tasksAs of April 2026, gpt-5.5 is the recommended model for complex work; gpt-5.3-codex is tuned for fast edits.| Mode | Command | What it's for |
|---|---|---|
| Interactive TUI | codex | Conversational coding, the default experience |
| Exec | codex exec "<prompt>" | Scripted, non-interactive runs — great for CI |
| Cloud | codex cloud | Offload long tasks to OpenAI's infra, review locally |
# Automate a recurring task with `codex exec`
codex exec "Find all task list comments in src/, group them by file, \
and write a markdown summary to TODO_REPORT.md"
# Run in CI after PR checks pass
codex exec --model gpt-5.5 "Review the diff against main and \
flag any missing test coverage for changed functions."Exec mode turns Codex into a scriptable tool you can chain with Make, GitHub Actions, or cron.The codex cloud command launches tasks on OpenAI infrastructure, which can run long without tying up your laptop. You can hand off a refactor at 5pm and pull the PR in the morning. Running codex cloud with no arguments opens an interactive picker of active and finished tasks.
You can paste screenshots or design specs directly into the Codex composer or pass image files on the command line. This is ideal for turning a mockup into real components or diagnosing a UI bug from a screen recording.
| Dimension | Claude Code | Codex CLI |
|---|---|---|
| Model | Claude family | GPT family |
| Project memory | CLAUDE.md | AGENTS.md (similar concept) |
| Parallel agents | Up to 10 subagents | Single-session + cloud offload |
| Extensibility | Skills, hooks, 25+ lifecycle events | MCP, exec scripts, cloud tasks |
| Pricing entry | Claude Pro $20/mo | Included in ChatGPT Plus/Pro |
The best agent is the one whose workflow matches your brain.
— A polyglot engineer
The big idea: Codex CLI and Claude Code are two terminal agents racing to the same destination. Install both, try them on real tasks for a week each, and let your wrists decide the winner.
15 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-coding-installing-codex-cli-creators
What is the core idea behind "Installing and Using the OpenAI Codex CLI"?
Which term best describes a foundational idea in "Installing and Using the OpenAI Codex CLI"?
A learner studying Installing and Using the OpenAI Codex CLI would need to understand which concept?
Which of these is directly relevant to Installing and Using the OpenAI Codex CLI?
What is the key insight about "MCP is first-class here too" in the context of Installing and Using the OpenAI Codex CLI?
What is the key insight about "Cost awareness" in the context of Installing and Using the OpenAI Codex CLI?
Which statement accurately describes an aspect of Installing and Using the OpenAI Codex CLI?
What does working with Installing and Using the OpenAI Codex CLI typically involve?
Which of the following is true about Installing and Using the OpenAI Codex CLI?
Which best describes the scope of "Installing and Using the OpenAI Codex CLI"?
Which section heading best belongs in a lesson about Installing and Using the OpenAI Codex CLI?
Which section heading best belongs in a lesson about Installing and Using the OpenAI Codex CLI?
Which section heading best belongs in a lesson about Installing and Using the OpenAI Codex CLI?
Which section heading best belongs in a lesson about Installing and Using the OpenAI Codex CLI?
Which section heading best belongs in a lesson about Installing and Using the OpenAI Codex CLI?