Codex CLI Deployment Guide
| Resource | URL |
|---|---|
| Official docs | Codex Quickstart |
| CLI docs | Codex CLI |
Codex CLI is OpenAI's local terminal coding agent. It can read, edit, and run code in the current directory, making it a good fit for terminal-first project work.
Windows
Native PowerShell install:
powershell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"You can also install it inside WSL2 using the Linux instructions if your project and toolchain live in a Linux environment.
macOS / Linux
Official standalone installer:
sh
curl -fsSL https://chatgpt.com/codex/install.sh | shPackage-manager alternatives:
sh
npm install -g @openai/codexOn macOS, Homebrew is also available:
sh
brew install --cask codexVerify And Start
sh
codex --version
cd /path/to/your/project
codexFollow the terminal prompts on first launch. If Windows blocks script execution, use the ExecutionPolicy ByPass install command above or adjust the local PowerShell policy after confirming the change is appropriate for your machine.