codex-plugin-cc/plugins/codex/commands/setup.md
Dominik Kundel c69527eb18
Initial commit
Co-authored-by: Codex <noreply@openai.com>
2026-03-30 09:42:33 -07:00

1.1 KiB

description argument-hint allowed-tools
Check whether the local Codex CLI is ready and optionally toggle the stop-time review gate [--enable-review-gate|--disable-review-gate] Bash(node:*), Bash(npm:*), AskUserQuestion

Run:

node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" setup --json $ARGUMENTS

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:
npm install -g @openai/codex
  • Then rerun:
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" setup --json $ARGUMENTS

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.