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.
6 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-coding-installing-codex-cli-creators
What is the main idea of "Installing and Using the OpenAI Codex CLI"?
Which concept is most central to "Installing and Using the OpenAI Codex CLI"?
What should a careful learner remember about "MCP is first-class here too"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about Codex CLI be treated?
Name one way to verify an AI answer about Codex CLI.