Skip to main content
Codex CLI requires Node.js and npm. After installation, run codex at least once to confirm Codex starts correctly.

1. Check Node.js

node --version
npm --version
If version numbers appear, Node.js and npm are installed. If Node.js is not installed, refer to the Node.js installation guide, then run the checks again.

2. Install Codex CLI

npm install -g @openai/codex@latest
Check the installed version:
codex --version

3. Initialize Codex

codex
If the Codex chat UI, model information, or command hints appear, the installation succeeded. Codex started successfully