Dev tools · ★ 129,084 GitHub stars (as of 2026-10-14)
Codex CLI
Codex CLI is OpenAI's open-source coding agent that runs in the terminal on your computer.
Overview
Codex CLI is a lightweight coding agent made by OpenAI that runs in the terminal on your computer. The same Codex can also be used in code editors such as VS Code, Cursor and Windsurf or in a desktop app, and there is also a separate cloud agent, Codex Web.
Install it with the install script for Mac, Linux or Windows, npm or Homebrew, or download a platform-specific executable from GitHub Releases. If you log in with a ChatGPT account on first run, you can use the usage included in your plan; with additional setup, you can also use an API key.
It suits developers who work directly in the terminal and want to hand off writing and editing code to an agent.
What it is used for
- Hand off coding tasks to the agent from the terminal.
- Install Codex in your code editor and use it within the editing view.
- Use Codex in a desktop app environment with the codex app command.
- Connect Codex with a ChatGPT plan or an API key.
Pricing and license
Apache-2.0 License. Use it as part of ChatGPT Plus, Pro, Business, Edu or Enterprise plans, or with an API key
Getting started
- On Mac and Linux, run curl -fsSL https://chatgpt.com/codex/install.sh | sh.
- On Windows, run powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex".
- If you use a package manager, install with npm install -g @openai/codex or brew install --cask codex.
- Run codex, choose Sign in with ChatGPT and log in.
Links
Related terms and companies
Sources
Compiled from public sources (official pages, READMEs). Pricing and features change, so check the official site.