codex
Lightweight coding agent that runs in your terminal
Codex CLI is an AI coding agent from OpenAI that runs in your terminal, letting you ask questions about your code and have the assistant take actions on local files without leaving the command line.
Codex CLI is a coding agent from OpenAI that runs locally on your computer, in the terminal. The idea is to give you an assistant you can talk to about your code right where you already work — at the command line — instead of having to switch to a browser or a separate app. Once installed, you simply run the command codex and start interacting.
The repository describes Codex as lightweight, and it ties into OpenAI's broader Codex ecosystem. There are companion ways to use it: integrations for code editors such as VS Code, Cursor, and Windsurf if you want the assistant inside your IDE; a desktop app experience launched with codex app; and a cloud-based version called Codex Web available on chatgpt.com/codex.
To use it, you sign in with your ChatGPT account so Codex runs as part of your existing Plus, Pro, Business, Edu, or Enterprise plan. Alternatively you can authenticate with an API key, which requires extra setup. Installation is done globally through npm or through Homebrew on macOS as a cask, and prebuilt binaries are also published on the GitHub Releases page for macOS (Apple Silicon and x86_64) and Linux (x86_64 and arm64).
Someone would actually use Codex CLI when they want an AI coding helper available next to their existing workflow without leaving the terminal — for example while writing or modifying a project, asking questions about code, or having the agent take actions on the local machine. The project is written in Rust and the repository is licensed under Apache-2.0.
Where it fits
- Ask an AI to explain, refactor, or debug code in your current project without switching away from the terminal
- Have the agent create or modify files in your codebase based on plain-English instructions
- Use it inside VS Code, Cursor, or Windsurf as an integrated AI coding assistant
- Run coding tasks in the cloud via the Codex Web interface on chatgpt.com when you do not want a local install