Skip to main content

CLI Commands

prisma-airs-codex-hooks CLI

After installing globally with npm install -g @cdot65/prisma-airs-codex-hooks:

CommandDescription
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-connectionTest AIRS API connectivity with your credentials
prisma-airs-codex-hooks validate-detectionSend 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

CommandDescription
pnpm buildCompile TypeScript and bundle hooks to dist/hooks/*.mjs
pnpm testRun all tests
pnpm test:watchRun tests in watch mode
pnpm typecheckTypeScript type checking (tsc --noEmit)

Hook Management

CommandDescription
pnpm install-hooksInstall hooks to <git-root>/.codex/hooks.json (project-level)
pnpm install-hooks --globalInstall hooks to ~/.codex/hooks.json (all sessions)
pnpm uninstall-hooksRemove AIRS entries from project-level hooks.json
pnpm uninstall-hooks --globalRemove AIRS entries from global hooks.json
pnpm verify-hooksCheck hooks registration, bundles, config, and env vars

Validation

CommandDescription
pnpm validate-connectionTest AIRS API connectivity with your credentials
pnpm validate-detectionSend a test prompt injection and verify detection

Statistics

CommandDescription
pnpm statsShow scan statistics (last 24h)
pnpm stats --since 7dStats for the last 7 days
pnpm stats --since 1d --jsonStats as JSON output

Documentation

CommandDescription
pnpm docs:serveLocal docs preview (Docusaurus dev server)
pnpm docs:buildBuild the static docs site to docs-site/build/