pi-cc-permission

Plan mode + permission modes (manual / auto / bypass) for the pi coding agent

Packages

Package details

extension

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

$ pi install npm:pi-cc-permission
Package
pi-cc-permission
Version
0.1.1
Published
Aug 30, 2026
Downloads
303/mo · 7/wk
Author
sowyer666
License
MIT
Types
extension
Size
17.6 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

pi-cc-permission

Plan mode + permission modes for the pi coding agent. · English · 中文

What it does

Command Effect
/plan Toggle read-only plan mode (disables edit/write, restricts bash to a safe allowlist)
/permission manual Ask before every command and change
/permission auto Ask only for risky commands
/permission bypass Auto-approve everything (no prompts)
/permission Show the current mode

Footer shows the active mode: ⏸ plan · 🛡 manual · ⚡ auto · 🟢 bypass. The mode persists across /reload, resume, and branch switches.

Mode matrix

Mode bash edit / write
manual ask every time ask every time
auto ask only risky auto-approve
bypass auto-approve auto-approve

Risky commands: rm -rf, sudo, git push, git reset --hard, npm install, etc. (see RISKY_BASH in index.ts).

Install

# from this repo
pi install git:github.com/sowyer666/pi-cc-permission

# from npm
pi install npm:pi-cc-permission

Run /reload (or restart pi) after installing.

Configuration (optional)

Startup defaults live in ~/.pi/agent/permission-modes.json:

{
  "defaultMode": "manual",
  "startInPlan": false,
  "askForAllBashInManual": true
}
  • defaultMode: manual | auto | bypass
  • startInPlan: start in plan mode
  • askForAllBashInManual: true = manual mode asks even for read-only bash; false = ask only for mutating commands

CLI override: pi --plan --permission-mode auto.

Notes

  • Requires pi ^0.84 (Node >=22.19)
  • Read-only tools (read / grep / find / ls) are never gated
  • In non-interactive runs (pi -p / JSON mode) anything that would prompt is blocked (fail-closed), except in bypass mode
  • To adjust the safe/risky command lists edit SAFE_BASH / RISKY_BASH in index.ts, then /reload

License

MIT