Skip to main content
Check whether your local Codex CLI is ready to use. The command verifies Node.js, npm, the Codex CLI, and authentication status, then prints a report with any next steps. You can also use it to enable or disable the optional stop-time review gate.

Syntax

/codex:setup [--enable-review-gate|--disable-review-gate]

Flags

--enable-review-gate
boolean
Enable the stop-time review gate for the current project. When enabled, Codex runs a targeted review before Claude stops, blocking the stop if issues are found.
--disable-review-gate
boolean
Disable the stop-time review gate for the current project.

Output

The setup report shows:
  • Node.js — whether Node.js is available and its version
  • npm — whether npm is available
  • Codex CLI — whether @openai/codex is installed
  • Authentication — whether Codex is logged in and ready to run tasks
  • Review gate — whether the stop-time review gate is currently enabled
  • Next steps — any actions needed to get Codex fully ready

Install flow

If Codex is not installed but npm is available, the command offers to run the install for you:
npm install -g @openai/codex
Select Install Codex at the prompt and the plugin will install it, then rerun the setup check automatically. If npm is not available, you will need to install Codex manually before using the plugin.

Login

If Codex is installed but not authenticated, the setup report includes guidance to run:
!codex login
If browser-based login is blocked in your environment, use one of these alternatives:
!codex login --device-auth
!codex login --with-api-key
For details on how the stop-time review gate works, see Review gate.