Introduction
After installing GitHub Copilot CLI and Gemini CLI, I decided to install this one too. Most articles were too lengthy, so here’s a concise summary. Environment:
- macOS (Tahoe 26)
- Node.js 22
Unlike Gemini CLI, this requires a paid subscription.
Table of Contents
Installation Methods
Three installation methods available, including direct binary download.
Homebrew (Simple, Recommended)
brew install codexnpm Global Install (Node.js 18+)
npm install -g @openai/codexDirect Binary Download (Offline, etc.)
- Get macOS archive from GitHub Releases (Apple Silicon:
aarch64, Intel Mac:x86_64). - Extract, rename executable to
codex, and place in PATH (e.g.,/usr/local/bin).
Authentication
Sign in with ChatGPT (Most Common)
codex
# Follow prompts to select "Sign in with ChatGPT"Uses your ChatGPT plan (Plus/Pro/Team/Edu/Enterprise) quota directly. Limits described below.
Using OpenAI API Key
export OPENAI_API_KEY="YOUR_API_KEY"Launch
# Launch command
codex
# Non-interactive mode
codex exec -p "Summarize README in Japanese"Model and execution settings can be configured in ~/.codex/config.toml.
Update & Uninstall
# brew
brew upgrade codex # Update
brew uninstall codex # Uninstall
# npm
npm update -g @openai/codex # Update
npm uninstall -g @openai/codex # UninstallTroubleshooting
“command not found: codex”
Brew:
brew doctor→brew reinstall codexnpm: Check if
npm prefix -gis in PATH. Example:echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
Usage Limits
According to Codex usage limits, Plus users can send 30-150 messages per 5 hours, Pro users 300-1,500. Weekly limits also exist but amounts aren’t specified.
codex /statusUse this command to check your current limits.

