Flatrouter
Codex

Install Codex CLI

Install OpenAI's Codex CLI globally with npm and verify the install.

Codex CLI is OpenAI's AI coding command-line tool, for AI-assisted coding straight from the terminal.

Requirements

Install

npm install -g @openai/codex

Verify the install

codex --version
# a version number means the install succeeded

If you get command not found, confirm Node.js is installed (node --version) and run the install command again.

Next steps

On this page