›_DevSetupv1.0
~/tools/codex-cli

Install Codex CLI

AI agent↳ requires Node.js2 steps

OpenAI's Codex — a lightweight AI coding agent that runs in your terminal. Requires Node.js.

2 steps · deps resolved
1
step 1/2 · dependency

Install Node.js

LTS v24.x

JavaScript runtime built on Chrome's V8 engine. Required for npm, npx, and most JS-based CLI tools.

$curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
$source ~/.nvm/nvm.sh
$nvm install 24
2
step 2/2 · target

Install Codex CLI

OpenAI's Codex — a lightweight AI coding agent that runs in your terminal. Requires Node.js.

$npm install -g @openai/codex

That’s it. You’re set up.

Run codex in any project to start.

Get started

Verify your install:

$codex --version
codexStart interactive session
codex "fix this bug"Quick task

Full CLI referencecoming soon

About

Codex CLI is OpenAI's terminal coding agent. It has similar agentic capabilities to Claude CLI — reads files, runs commands, and iterates on code. Uses OpenAI models including GPT-4o, o1, and o3. Best choice if you are already in the OpenAI ecosystem or have existing API credits. Requires an OpenAI API key.

Compare
Claude CLI vs Codex CLIsoon
Codex CLI vs Gemini CLIsoon
Related tools