CLI Commands
prisma-airs-codex-hooks CLI
After installing globally with npm install -g @cdot65/prisma-airs-codex-hooks:
| Command | Description |
|---|---|
prisma-airs-codex-hooks install [--global] | Register hooks in Codex's hooks.json and copy bundles |
prisma-airs-codex-hooks uninstall [--global] | Remove AIRS entries from hooks.json |
prisma-airs-codex-hooks verify [--global] | Check hooks registration, bundles, config, and env vars |
prisma-airs-codex-hooks validate-connection | Test AIRS API connectivity with your credentials |
prisma-airs-codex-hooks validate-detection | Send a test prompt injection and verify detection |
prisma-airs-codex-hooks stats [--since <duration>] [--json] | Show scan statistics |
Examples
# Install hooks for all Codex sessions
prisma-airs-codex-hooks install --global
# Check everything is working
prisma-airs-codex-hooks verify --global
# Stats for the last 7 days as JSON
prisma-airs-codex-hooks stats --since 7d --json
# Remove hooks
prisma-airs-codex-hooks uninstall --global
Trust after install
After install, open Codex and run /hooks to review and trust the new hook definitions — Codex skips untrusted hooks.
pnpm scripts (from source)
When working from a cloned repository (pnpm workspace — see Contributing):
Build & Test
| Command | Description |
|---|---|
pnpm build | Compile TypeScript and bundle hooks to dist/hooks/*.mjs |
pnpm test | Run all tests |
pnpm test:watch | Run tests in watch mode |
pnpm typecheck | TypeScript type checking (tsc --noEmit) |
Hook Management
| Command | Description |
|---|---|
pnpm install-hooks | Install hooks to <git-root>/.codex/hooks.json (project-level) |
pnpm install-hooks --global | Install hooks to ~/.codex/hooks.json (all sessions) |
pnpm uninstall-hooks | Remove AIRS entries from project-level hooks.json |
pnpm uninstall-hooks --global | Remove AIRS entries from global hooks.json |
pnpm verify-hooks | Check hooks registration, bundles, config, and env vars |
Validation
| Command | Description |
|---|---|
pnpm validate-connection | Test AIRS API connectivity with your credentials |
pnpm validate-detection | Send a test prompt injection and verify detection |
Statistics
| Command | Description |
|---|---|
pnpm stats | Show scan statistics (last 24h) |
pnpm stats --since 7d | Stats for the last 7 days |
pnpm stats --since 1d --json | Stats as JSON output |
Documentation
| Command | Description |
|---|---|
pnpm docs:serve | Local docs preview (Docusaurus dev server) |
pnpm docs:build | Build the static docs site to docs-site/build/ |