Skip to content

Codex CLI Deployment Guide

ResourceURL
Official docsCodex Quickstart
CLI docsCodex 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 | sh

Package-manager alternatives:

sh
npm install -g @openai/codex

On macOS, Homebrew is also available:

sh
brew install --cask codex

Verify And Start

sh
codex --version
cd /path/to/your/project
codex

Follow 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.

Next Steps