pi-root-grant

Pi extension that lets agents request temporary sudo-backed root access with explicit user approval.

Packages

Package details

extension

Install pi-root-grant from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-root-grant
Package
pi-root-grant
Version
0.1.1
Published
May 12, 2026
Downloads
130/mo · 13/wk
Author
faithless
License
MIT
Types
extension
Size
27.9 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/root-grant.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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-status commands.
  • Adds request_root_access and revoke_root_access tools.
  • Wraps pi's bash, read, write, and edit tools so they use sudo only 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-grant

Or from git:

pi install git:github.com/OliverMarcusson/pi-root-grant

Usage

Ask the agent to request root access when needed, or run:

/root 5m
/root-status
/root-off

Durations 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.