2026-04-03 22:36:50 +00:00
|
|
|
---
|
|
|
|
|
description: Check whether the local Codex CLI is ready and optionally toggle the stop-time review gate
|
|
|
|
|
argument-hint: '[--enable-review-gate|--disable-review-gate]'
|
|
|
|
|
allowed-tools: Bash(node:*), Bash(npm:*), AskUserQuestion
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
Run:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-04-09 08:36:01 +00:00
|
|
|
node "${CLAUDE_PLUGIN_ROOT}/vendor/codex/scripts/codex-companion.mjs" setup --json $ARGUMENTS
|
2026-04-03 22:36:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If the result says Codex is unavailable and npm is available:
|
|
|
|
|
- Use `AskUserQuestion` exactly once to ask whether Claude should install Codex now.
|
|
|
|
|
- Put the install option first and suffix it with `(Recommended)`.
|
|
|
|
|
- Use these two options:
|
|
|
|
|
- `Install Codex (Recommended)`
|
|
|
|
|
- `Skip for now`
|
|
|
|
|
- If the user chooses install, run:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npm install -g @openai/codex
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- Then rerun:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-04-09 08:36:01 +00:00
|
|
|
node "${CLAUDE_PLUGIN_ROOT}/vendor/codex/scripts/codex-companion.mjs" setup --json $ARGUMENTS
|
2026-04-03 22:36:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If Codex is already installed or npm is unavailable:
|
|
|
|
|
- Do not ask about installation.
|
|
|
|
|
|
|
|
|
|
Output rules:
|
|
|
|
|
- Present the final setup output to the user.
|
|
|
|
|
- If installation was skipped, present the original setup output.
|
|
|
|
|
- If Codex is installed but not authenticated, preserve the guidance to run `!codex login`.
|