Codex CLI: lightweight coding agent from OpenAI that runs in your terminal
Latest in the story ·
Codex CLI[1] is a coding agent from OpenAI that runs locally on your computer. The GitHub repository describes it as a lightweight coding agent that runs in your terminal, and the code is licensed under Apache-2.0. Other versions exist: Codex for code editors such as VS Code, Cursor and Windsurf, a desktop app, and Codex Web, the cloud-based agent at chatgpt.com/codex.
On Mac or Linux, Codex CLI is installed with a curl command, and on Windows with a PowerShell command. It can also be installed through npm[2] (npm install -g @openai/codex) or Homebrew[3] (brew install --cask codex). The standalone installers download from releases.openai.com/codex by default and fall back to GitHub Releases if that download fails. Setting CODEX_INSTALLER_USE_RELEASES_OPENAI_COM to false forces the installer to use GitHub Releases.
To sign in, run codex and select Sign in with ChatGPT; OpenAI recommends this with a Plus, Pro, Business, Edu or Enterprise plan. Codex can also be used with an API key[4], but this requires additional setup.

