For macOS, you have two good options: Codex Desktop App or Codex CLI.
Option 1: Install Codex Desktop App on macOS
This is the recommended option if you want a GUI app.
- Download the Codex app for macOS.
- Choose the correct build:
- Apple Silicon for M1/M2/M3/M4 Macs
- Intel for older Intel-based Macs
- Install it like a normal macOS app.
- Open Codex.
- Sign in using your ChatGPT account or an OpenAI API key.
- Select a project folder.
- Make sure Local mode is selected if you want Codex to work on your machine. (OpenAI Developers)
OpenAI says the Codex app is available on macOS and Windows, and ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. (OpenAI Developers)
Option 2: Install Codex CLI on macOS
This is best if you want to use Codex from Terminal.
Method A: Using npm
First, make sure Node.js and npm are installed:
node -v
npm -v
Then install Codex:
npm i -g @openai/codex
Run it:
codex
The first time you run it, Codex will ask you to sign in with your ChatGPT account or an OpenAI API key. (OpenAI Developers)
Method B: Using Homebrew
If you use Homebrew:
brew install codex
Then run:
codex
OpenAI’s quickstart lists both npm and Homebrew installation methods for Codex CLI on macOS. (OpenAI Developers)
Upgrade Codex CLI later
For npm install:
npm i -g @openai/codex@latest
OpenAI notes that new CLI versions are released regularly, so upgrading is useful. (OpenAI Developers)
Recommended setup for developers
Use both:
brew install codex
Then install the Codex macOS app too.
That gives you:
| Tool | Best for |
|---|---|
| Codex App | Managing projects, threads, worktrees, Git, review, local tasks |
| Codex CLI | Terminal-based coding, repo inspection, file edits, running commands/tests |
So the clean macOS setup is:
brew install codex
codex
Then install the desktop app for a smoother GUI workflow.