CLI Commands
prisma-airs-hooks CLI
After installing globally with npm install -g @cdot65/prisma-airs-cursor-hooks:
| Command | Description |
|---|---|
prisma-airs-hooks install [--global] | Register hooks in Cursor's hooks.json |
prisma-airs-hooks uninstall [--global] | Remove AIRS entries from hooks.json |
prisma-airs-hooks verify [--global] | Check hooks registration, config, and env vars (use --global for ~/.cursor) |
prisma-airs-hooks validate-connection | Test AIRS API connectivity with your credentials |
prisma-airs-hooks validate-detection | Send a test prompt injection and verify detection |
prisma-airs-hooks stats [--since <duration>] [--json] | Show scan statistics |
prisma-airs-hooks logs [--n 10] [--json] | Show the most recent scan log entries |
prisma-airs-hooks rotate-log | Rotate the scan log immediately |
prisma-airs-hooks validate-config | Validate the AIRS configuration (no API calls) |
prisma-airs-hooks doctor | Diagnose the installation and apply safe repairs |
Examples
# Install hooks for all workspaces
prisma-airs-hooks install --global
# Check everything is working (use --global if you installed with --global)
prisma-airs-hooks verify --global
# Stats for the last 7 days as JSON
prisma-airs-hooks stats --since 7d --json
# Review the last 20 scan log entries
prisma-airs-hooks logs --n 20
# Validate config and repair problems
prisma-airs-hooks validate-config
prisma-airs-hooks doctor
# Remove hooks
prisma-airs-hooks uninstall --global
npm run scripts (from source)
When working from a cloned repository:
Build & Test
| Command | Description |
|---|---|
npm run build | Compile hooks to dist/ |
npm test | Run all tests |
npm run test:watch | Run tests in watch mode |
npm run typecheck | TypeScript type checking (tsc --noEmit) |
Hook Management
| Command | Description |
|---|---|
npm run install-hooks | Install hooks to .cursor/hooks.json (project-level) |
npm run install-hooks -- --global | Install hooks to ~/.cursor/hooks.json (all workspaces) |
npm run install-hooks -- --optional <names|all> | Also register optional hooks (comma-separated names or all) |
npm run uninstall-hooks | Remove AIRS entries (core + optional) from project-level hooks.json |
npm run uninstall-hooks -- --global | Remove AIRS entries from global hooks.json |
npm run verify-hooks | Check project-level hooks registration, config, and env vars |
npm run verify-hooks -- --global | Check global (~/.cursor) hooks registration and config |
Validation
| Command | Description |
|---|---|
npm run validate-connection | Test AIRS API connectivity with your credentials |
npm run validate-detection | Send a test prompt injection and verify detection |
npm run validate-config | Validate the AIRS configuration (no API calls) |
npm run doctor | Diagnose the installation and apply safe repairs |
Statistics & Logs
| Command | Description |
|---|---|
npm run stats | Show scan statistics (all time) |
npm run stats -- --since 7d | Stats for the last 7 days |
npm run stats -- --since 1d --json | Stats as JSON output |
npm run logs | Show the most recent scan log entries |
npm run logs -- --n 20 | Show the last 20 scan log entries |
npm run rotate-log | Rotate the scan log immediately |
stats and logs both read the scan log from your AIRS config (logging.path,
default ~/.cursor/hooks/airs-scan.log), so they report on the same log your
hooks actually write to — regardless of the directory you run them from.
Documentation
| Command | Description |
|---|---|
npm run docs:serve | Local docs preview at http://localhost:3000 |
npm run docs:build | Build static docs site to docs-site/build/ |