pi-root-grant
v0.1.0
Published
Pi extension that lets agents request temporary sudo-backed root access with explicit user approval.
Maintainers
Readme
pi-root-grant
Pi package that adds an explicit, temporary root-access grant flow for agents.
What it does
- Adds
/root,/root-off, and/root-statuscommands. - Adds
request_root_accessandrevoke_root_accesstools. - Wraps pi's
bash,read,write, andedittools so they usesudoonly while a grant is active. - Prompts for confirmation and, if needed, a masked sudo password.
- Revokes access automatically on expiry and on session shutdown.
Install
pi install npm:pi-root-grantOr from git:
pi install git:github.com/OliverMarcusson/pi-root-grantUsage
Ask the agent to request root access when needed, or run:
/root 5m
/root-status
/root-offDurations are capped at 15 minutes.
Security notes
Extensions run with your user permissions. This package intentionally enables sudo-backed operations only after interactive approval. Review the code before installing and grant access only for tasks you trust.
