> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/openai/codex-plugin-cc/llms.txt
> Use this file to discover all available pages before exploring further.

# /codex:setup

> Check whether Codex is installed and authenticated, and manage the optional review gate.

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

<ParamField path="--enable-review-gate" type="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.
</ParamField>

<ParamField path="--disable-review-gate" type="boolean">
  Disable the stop-time review gate for the current project.
</ParamField>

## 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:

```bash theme={null}
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:

```bash theme={null}
!codex login
```

If browser-based login is blocked in your environment, use one of these alternatives:

```bash theme={null}
!codex login --device-auth
!codex login --with-api-key
```

## Related

For details on how the stop-time review gate works, see [Review gate](/configuration/review-gate).
