pi-readonly-mode
Strict read-only mode extension for pi: blocks edit/write and destructive bash commands, toggled with /readonly or --readonly.
Package details
Install pi-readonly-mode from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-readonly-mode- Package
pi-readonly-mode- Version
1.0.0- Published
- Oct 29, 2026
- Downloads
- 345/mo · 345/wk
- Author
- ryansupak
- License
- MIT
- Types
- extension
- Size
- 6.6 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/readonly-mode.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-readonly-mode
Strict read-only mode extension for pi.
While active it:
- Limits the active tool set to
read,bash,grep,find,ls,question. - Silently blocks
editandwritetool calls. - Blocks
bashcommands matching destructive patterns (rm,mv,cp,sudo, git writes, package installs, redirects, editors, etc.). - Injects hidden guidance telling the model it may only inspect and analyze.
- Shows a small
READONLYstatus indicator. - Persists across sessions and resumes.
Install
pi install npm:pi-readonly-mode
Or try it for a single invocation without saving it:
pi -e npm:pi-readonly-mode
Use
- Toggle during a session with
/readonly. - Start a session read-only with
pi --readonly.
The mode is persisted in the session, so resuming a session restores its state.
License
MIT