
Codex CLI
FreemiumOpenAI's terminal-based coding agent that inspects, edits, and runs code with configurable permissions.

About Codex CLI
Codex CLI is a command-line coding agent from OpenAI. Run it inside a repository to have Codex inspect files, explain project structure, make focused edits, and run the development tools already installed on your machine. You can steer an active turn, watch commands and diffs appear, and keep follow-up work in the same session.
It works interactively or through codex exec for scripts and CI. You choose the model, reasoning effort, and when Codex may edit files or run commands. Sign-in options include ChatGPT. Local code review reports prioritized findings without changing your working tree, and MCP servers can connect external tools. Git checkpoints are recommended before and after tasks.
Key Features
- Terminal-based coding loop: inspect files, make edits, and run locally installed tools in a repository
- Configurable model, reasoning effort, and permissions per run
- Non-interactive execution with codex exec for scripts and CI pipelines
- Dedicated code review against uncommitted changes, a commit, or a base branch without modifying the working tree
- Skills and plugins for repeatable instructions and team tool/data connections
- Resume or search saved chats from the current repository
- MCP server support for local or remote external tools
Use Cases
- Exploring an unfamiliar repository and locating key files
- Making focused code changes and running local development tools
- Running Codex non-interactively in automated or CI workflows
- Reviewing changes before committing or opening a pull request
- Building a terminal workflow with saved sessions and delegated sub-agents
- Connecting external tools and data through MCP servers
- Handing work to Codex cloud and applying results locally from the terminal
Frequently Asked Questions
On macOS/Linux, use the standalone installer with the provided curl command; npm and Homebrew are also listed. Windows is supported. Then open a project directory and run codex. On first run, sign in with ChatGPT or another available method.
The first time you run Codex in a project directory, you choose Sign in with ChatGPT or another available sign-in method. Authentication options are documented on the site.
Use codex exec to run a non-interactive command in repeatable workflows and pipelines, such as scripts or CI jobs.
Yes. You can set when Codex may edit files or run commands without asking, and inspect the active sandbox and writable roots before continuing.
No. The review reports prioritized findings without modifying your working tree, so you can address risks before committing or opening a pull request.
Yes, through MCP. You can add local or remote MCP servers, authenticate when needed, and inspect the tools available to the current session before Codex uses them.
You can switch a run to live web search when a task depends on current releases, documentation, or external behavior. Search activity stays visible in the transcript.
You can reopen a recent chat from the current repository or search across local chats to return to older work.
The CLI runs on macOS, Linux, and Windows, with npm and Homebrew installation options. Shell completions can be generated, and longer prompts can open in the editor configured by VISUAL or EDITOR.
Discover your next favorite AI tool
Get handpicked AI tools, fresh launches, and practical insights delivered to your inbox.