LLM Reference
CLITerminal & CLI harnessesOpen Source

OpenAI Codex CLI

by OpenAI
Supports 7 models · CLI · Free open-source · Defaults: GPT-5.4

OpenAI Codex CLI is OpenAI's open-source, command-line coding agent, first released in May 2025 and maintained in the open on GitHub. It runs OpenAI models directly in your terminal to read and edit files, run commands, and complete multi-step tasks inside a sandboxed environment. The CLI itself is free and open source; you pay only for the OpenAI API usage it consumes (or a ChatGPT plan where supported).

Overview

Open-source command-line coding agent released April 2025 that runs code, browses files, and executes multi-step tasks in a sandboxed environment using OpenAI models.

Compare OpenAI Codex CLI side-by-side with other CLI, IDE, cloud, and framework agents on pricing, model coverage, and release cadence.

Try OpenAI Codex CLI

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Best LLMs for this agent

GPT-5.4ChatGPT Plus

Default — latest frontier agentic coding model

Pricing and Provider Comparison

Hosted agents expose plan pricing. Bring-your-own-key agents pass the main cost through the model provider route you configure.

Agent access tiers

TierPriceIncludes
FreeFreeLimited Codex access
ChatGPT Go$8/moBasic Codex access, entry-level paid tier
ChatGPT Plus$20/moCodex included, message limits per 5hrs
ChatGPT Pro$200/moHighest priority, maximum message limits
ChatGPT Business$30/moWorkspace credits, admin controls
EnterpriseCustomUnlimited high-speed access, SSO, advanced security

Provider routes for recommended models

ModelProviderInput / 1MOutput / 1MNotes
GPT-5.4OpenAI API$2.50$15.00Batch pricing listed; Cache reads listed
GPT-5.4OpenRouter$2.5$15Cache reads listed
GPT-5.4Vercel AI Gateway$2.5$15Cache reads listed

Featured Model Specs

ModelLabReleasedContextReasoningOpenness
GPT-5.4OpenAI2026-03-051.05mYesProprietary
GPT-5.4 MiniOpenAI2026-03-05400kYesProprietary
GPT-5.3-CodexOpenAI2026-02-05400kYesProprietary
GPT-5.2 CodexOpenAI2025-12-18400kYesProprietary
GPT-5.2OpenAI2025-12-11400kYesProprietary

Model Compatibility Matrix

ModelLabDefaultAccess tierNotes
GPT-5.4OpenAIYesChatGPT PlusDefault — latest frontier agentic coding model
GPT-5.4 MiniOpenAINoChatGPT PlusSmaller frontier agentic coding model
GPT-5.3-CodexOpenAINoChatGPT PlusFrontier Codex-optimized agentic coding model
GPT-5.2 CodexOpenAINoChatGPT PlusFrontier agentic coding model based on GPT-5.2
GPT-5.2OpenAINoChatGPT PlusOptimized for professional work and long-running agents
GPT-5.1 Codex MaxOpenAINoChatGPT PlusCodex-optimized flagship for deep and fast reasoning
GPT-5.1 Codex MiniOpenAINoChatGPT PlusCheaper, faster, but less capable — optimized for Codex

Underlying Models

Capabilities

FeatureSupported
ChatYes
Agent modeYes
Multi-file editYes
AutocompleteNo
TerminalYes
Code reviewYes
Git integrationYes
Deploy integrationNo
Local modelsNo
Bring your own keyYes
MCP supportYes
Offline modeNo
IP indemnityNo
SSOYes
On-premNo

Compare to Similar Agent Surfaces

FAQ

What is OpenAI Codex CLI?

OpenAI Codex CLI is an open-source command-line tool for AI-assisted coding, built by OpenAI (released 2025-05). Engineers run it from a terminal, where it can inspect repositories, edit files, call tools, and drive repeatable agentic coding workflows across local projects. It is primarily used for agentic coding from a local shell.

What models does OpenAI Codex CLI support?

OpenAI Codex CLI runs GPT-5.4 Mini, GPT-5.4, GPT-5.3-Codex, GPT-5.2 Codex, GPT-5.2, and 2 more.

How much does OpenAI Codex CLI cost?

OpenAI Codex CLI is free and open source. You pay only for the underlying model API usage.

Is OpenAI Codex CLI open source?

Yes, OpenAI Codex CLI is open-source software.

What are alternatives to OpenAI Codex CLI?

Alternatives include MiMo-Code, Mistral Vibe, and Gemini CLI.

When was OpenAI Codex CLI released?

OpenAI Codex CLI was released in 2025-05.

Explore Related Pages

Last reviewed: 2026-06-30. Data sourced from agent documentation and provider pages.