Codex CLI
Install NebGuard for the OpenAI Codex CLI. First check the shared prerequisites: the nebguard binary on your PATH, and the Codex CLI already installed.
Codex support wires NebGuard into ~/.codex/config.toml as command hooks. It adds one step Claude Code does not need: Codex runs a command hook only after you trust it, so setup includes an explicit trust step.
1. Run setup
nebguard setup codex-cli
This places the binary at ~/.codex/bin/nebguard and merges a NebGuard hook block into ~/.codex/config.toml, preserving your existing config. It requires the Codex CLI already installed (a ~/.codex directory present).
2. Trust the hooks
Codex silently skips a command hook until you review and trust it, so the hook NebGuard just wrote does not guard anything yet. Setup prints an ACTION REQUIRED block and, in an interactive terminal, waits while you complete the trust step:
- Run
codex. - Type
/hooks. - Review and Trust every NebGuard hook (all listed events).
- Exit Codex and return to the setup prompt.
Setup then re-checks and confirms NebGuard is active for Codex once the trust is recorded. If you run setup non-interactively (in CI, or with no terminal), it prints a warning instead of waiting; trust the hooks via /hooks, then re-run nebguard setup codex-cli to verify.
Until you trust the hooks, Codex runs without NebGuard. There is no partial state: the guard is either trusted and active, or skipped entirely. Always finish the trust step, then verify.
3. Verify
nebguard setup codex-cli
Re-running setup is safe and idempotent, and it preserves an existing trust. When trust is in place it prints Codex hook trust: verified. NebGuard is active for Codex. The nebguard version command confirms the binary itself.
Uninstall
nebguard uninstall --host codex-cli
This strips the NebGuard hook block from ~/.codex/config.toml, leaving your own entries intact, and removes the installed binary. Note the --host codex-cli flag: a bare nebguard uninstall targets Claude Code.
Next steps
- Claude Code: set up another assistant.
- Concepts: the safety model, domains, licensing, and telemetry.
- Examples: what a block and a guidance note look like.