OpenAI Codex CLI
Codex CLI is a coding agent from OpenAI that runs locally on your computer. It helps developers automate coding tasks directly from the terminal. It is for developers who want an AI assistant integrated into their command-line workflow.
🎬 Getting started with Codex · OpenAI
✨ Key features
- Runs locally on your computer
- Sign in with ChatGPT plan (Plus, Pro, etc.)
- Install via curl, PowerShell, npm, or Homebrew
- Available for macOS and Linux (and Windows via PowerShell)
- Standalone binaries for Apple Silicon and x86_64
- Can be used with an API key (additional setup required)
🎯 Use cases
- Automate coding tasks from the terminal
- Integrate AI assistance into your development workflow
- Use as a desktop app via 'codex app'
- Use in IDEs like VS Code, Cursor, or Windsurf
📦 Installation
🧰 Requirements: Mac or Linux (Windows supported via PowerShell), a ChatGPT account (Plus, Pro, Business, Edu, or Enterprise) or an API key for authentication.
Installing and running Codex CLI
Run the following on Mac or Linux to install Codex CLI:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Run the following on Windows to install Codex CLI:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
Codex CLI can also be installed via the following package managers:
# Install using npm
npm install -g @openai/codex
# Install using Homebrew
brew install --cask codex
Then simply run codex to get started.
🚀 Usage
Run codex and select Sign in with ChatGPT to authenticate with your ChatGPT plan. After signing in, you can start using Codex CLI to interact with the coding agent.
❓ FAQ
How do I install Codex CLI on macOS or Linux?
Run the curl command: curl -fsSL https://chatgpt.com/codex/install.sh | sh.
Can I use Codex CLI with my ChatGPT plan?
Yes, run codex and select 'Sign in with ChatGPT' to use it with your Plus, Pro, Business, Edu, or Enterprise plan.
Is Codex CLI available for Windows?
Yes, you can install it using PowerShell: powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex".
Can I install Codex CLI via a package manager?
Yes, you can install it via npm (npm install -g @openai/codex) or Homebrew (brew install --cask codex).
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.