OpenAI's coding agent in your terminal, IDE and ChatGPT.
Codex reads your codebase, edits files and runs commands from plain-language requests. The CLI is open source; the same agent runs in the desktop app, IDE extensions and ChatGPT on the web.
Works with
Key info
- Pricing
- Open source
- Platform
- macOS · Windows · Linux
- Category
- CLIs
- Best for
- Intermediate
- Free plan
- The CLI is free and open source; usage needs a ChatGPT plan or API credits
- Paid plans from
- Included with ChatGPT Plus, or pay per token with an API key
- Install
- npm install -g @openai/codex
- Models
- OpenAI's GPT models
- Your own API key
- Yes, an OpenAI key
- Local models
- Yes, open-weight models through Ollama
- Good for
- ChatGPT subscribers who want an agent in the terminal
Related reading
- Fundamentals
Reviewing code you did not write
You are going to merge a lot of code you did not type. Reviewing it is a different skill from writing it, and it is the one that actually keeps a vibe-coded…
Intermediate - Context engineering
Why your AI keeps forgetting what you told it
Models have a context window, a fixed budget of text they can consider at once. Everything competes for it: your instructions, the files you opened, the erro…
Intermediate