Skip to content

pi-gatekeeper

FreeGovernanceApache-2.0

Parses every shell command into a syntax tree, flags risky ones, and blocks the catastrophic ones outright - no override. Not a keyword blocklist: it understands command structure.

Capabilities

  • AST analysis, not keyword matching - catches obfuscated, aliased, and piped destructive commands.
  • Catastrophic commands (rm -rf /, mkfs, dd, fork bombs) always blocked, no override.
  • Per-command approval dialog: approve, deny, or allow for this project.
  • Auto-deny patterns you can add and remove.
  • Governance events emitted on every block and approval.

Installation Instructions

Install

pi install npm:@bastilleworks/pi-gatekeeper

Usage Instructions

Pi command

/gatekeeper

Pi command

/gatekeeper deny <pattern> <description>

Pi command

/gatekeeper allow <id>

A status indicator in the Pi footer shows the current mode. Tab on Approve or Deny to expand the editor and attach a message.

Uninstall

Uninstall this extension

pi uninstall npm:@bastilleworks/pi-gatekeeper

Notes

  • Free and open-source (Apache-2.0). Installs from public npm.

Source and full reference in thepublic repository.