Reference articles on history, science, culture and more
Encyclopedia

Codex CLI

Open-source AI coding agent by OpenAI

Image credit is listed at the end of this article.

Codex CLI is an open-source artificial intelligence coding agent developed by OpenAI. It operates through a command-line interface and can read and modify files, execute commands, and perform software development tasks on a user's local computer.

Codex CLI is part of OpenAI's broader Codex software-development platform, alongside Codex extensions for integrated development environments, desktop applications, and cloud-based development.

01History

OpenAI released Codex CLI on April 16, 2025, alongside the introduction of its o3 and o4-mini reasoning models. The software was introduced as a lightweight coding agent designed to connect OpenAI models with source code and computing tasks through a user's terminal.

02Features

Codex CLI works directly with the files and directories of a software project, allowing it to create and modify source code without requiring an integrated development environment. Through its command-line interface, it can also execute shell commands, use web search, and run build tools, application frameworks, web frameworks, tests, and other development tools used by the project.

The software supports interactive terminal sessions, image input, approval consent, and sandboxing controls governing which commands the agent may execute.

Codex CLI can connect to external tools and services through the Model Context Protocol (MCP), allowing additional capabilities to be exposed to the agent through configured MCP servers.

Codex CLI can use both locally hosted and remote large language models. Local models can be served through Ollama or LM Studio, while external model providers can be configured through compatible APIs, including OpenRouter.

Watch videos about Codex CLIExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Codex CLI, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Images, from Wikimedia Commons:

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.