Codex Manual

Download and Install

Install the CLI first, then open the App or IDE extension as needed.

macOS

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex

Homebrew:

brew install --cask codex
codex

Open the desktop app:

codex app

The desktop app is available for macOS, Windows, and Linux, and shares one config.toml with the CLI and IDE extension.

Windows Native

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
codex

Open the app:

codex app

The native route uses the Windows sandbox and needs neither WSL nor a virtual machine. OpenAI recommends Windows 11; a recent, fully updated Windows 10 (1809 or later) is best effort.

Useful developer tools:

winget install --id Git.Git
winget install --id OpenJS.NodeJS.LTS
winget install --id Python.Python.3
winget install --id GitHub.cli

Windows + WSL2

wsl --install
wsl

Inside WSL:

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex

Keep Linux projects under your WSL home directory when possible:

mkdir -p ~/code
cd ~/code

Linux

curl -fsSL https://chatgpt.com/codex/install.sh | sh
codex

Or:

npm install -g @openai/codex
codex

Upgrade

Upgrade the same way you installed: rerun the official install command, or run npm install -g @openai/codex@latest again.