@diegopetrucci/pi-permission-gate
A pi extension that prompts before dangerous bash commands.
Package details
Install @diegopetrucci/pi-permission-gate from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@diegopetrucci/pi-permission-gate- Package
@diegopetrucci/pi-permission-gate- Version
0.1.0- Published
- Apr 18, 2026
- Downloads
- 87/mo · 9/wk
- Author
- diegopetrucci
- License
- MIT
- Types
- extension
- Size
- 2.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
permission-gate
A small pi extension that prompts for confirmation before running potentially dangerous bash commands.
This is adapted from the original permission-gate.ts example in badlogic/pi-mono and kept basically the same.
What it checks
rm -rfsudochmod/chownwith777
If pi is running without an interactive UI, it blocks matching commands by default.
Install
Standalone npm package
pi install npm:@diegopetrucci/pi-permission-gate
Collection package
pi install npm:@diegopetrucci/pi-extensions
GitHub package
pi install git:github.com/diegopetrucci/pi-extensions
Then reload pi:
/reload
Notes
- Hooks the
tool_callevent. - Only inspects the
bashtool. - Prompts with a simple
Yes/Noselector before allowing dangerous commands.