LIVE|CLI v0.144.0·model GPT-5.6 Sol·verified 2026-07-09
Codex Insider
The unofficial wire for OpenAI Codex.
Install

How to install Codex

Published Jul 15, 2026 · Checked against the official docs

The short version

Two ways in. For the terminal agent, run `npm install -g @openai/codex`, then `codex`, and sign in with your ChatGPT account. For a GUI, the Codex app merged into the ChatGPT desktop app on July 9, 2026, so installing that app gets you Codex next to Chat and Work. Both accept a ChatGPT login or an API key.

The fastest path to the terminal agent is the npm package. Install it globally, launch it, sign in:

npm install -g @openai/codex
codex

On first run, pick Sign in with ChatGPT to use Codex on your Plus, Pro, Business, Edu, or Enterprise plan. You can use an API key instead, but that takes extra setup. That’s the whole thing for most people. The rest of this page is the other install routes and which one fits you.

Which one do you want

There are two products with the Codex name, and it matters which you install.

You can run both. They share one ChatGPT login.

Install the CLI

  1. npm (any OS with Node): npm install -g @openai/codex. You need Node.js on the machine first. The install guides cite Node 18 or newer, though the current CLI docs page doesn’t pin an exact version.
  2. Homebrew (Mac): brew install --cask codex. Use the --cask form the docs point to; that’s the OpenAI CLI.
  3. Install script: on Mac or Linux, curl -fsSL https://chatgpt.com/codex/install.sh | sh; on Windows, powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex". Both are documented on the official CLI page.
  4. Run codex and sign in.

Don’t hardcode a version. The current stable line is 0.144.x as of July 2026 and it ships often, so npm install -g @openai/codex always pulls the latest. For step-by-step per platform, see the OS guides in Related.

If it fails

  • Mac, Homebrew, “Apple could not verify rg”: the cask has shipped an unsigned ripgrep binary more than once. Fix on the rg gatekeeper page.
  • Windows, sign-in dies with os error 10013: Windows is reserving the OAuth callback port before Codex can bind it. Full fix on the login server port page.
  • codex: command not found after npm install: your global npm bin directory isn’t on PATH. Fix PATH, or reinstall with Homebrew or the install script.

Facts on this page verified July 15, 2026.

Sources