@monopi/extension-git-guard
Monopi git-guard pi extension.
Package details
Install @monopi/extension-git-guard from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@monopi/extension-git-guard- Package
@monopi/extension-git-guard- Version
0.6.1- Published
- Aug 28, 2026
- Downloads
- 318/mo · 31/wk
- Author
- ifiokjr
- License
- MIT
- Types
- extension
- Size
- 9.4 KB
- Dependencies
- 0 dependencies · 5 peers
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
@monopi/extension-git-guard
The git-guard extension adds four git safety features for git-managed repositories:
- interactive git guard: blocks git shell commands that are likely to open an editor and hang
- dirty repo warning: notifies you at session start when there are uncommitted changes
- turn checkpoints: creates a git stash snapshot before each agent turn
- terminal notification: sends a desktop or terminal notification when the agent finishes
It supports the Kitty (OSC 99) and generic terminal (OSC 777) notification protocols.
Install
pi install npm:@monopi/extension-git-guard
Behavior details
The interactive git guard inspects each bash and native_shell command before it runs. If a segment looks like an interactive git command (for example, a rebase without --no-edit or a commit without a message flag), the extension blocks it and suggests a non-interactive equivalent. Commands with an explicit editor override or message flag pass through.
Checkpoints stash the working tree before each agent turn and restore cleanly when the turn finishes, so a bad edit never costs you uncommitted work.