@artale/pi-git-guard
Git safety guard: protect branches, scan secrets, prevent mistakes
Package details
Install @artale/pi-git-guard from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@artale/pi-git-guard- Package
@artale/pi-git-guard- Version
1.0.0- Published
- Apr 21, 2026
- Downloads
- 80/mo · 14/wk
- Author
- artale
- License
- MIT
- Types
- package
- Size
- 9.2 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"commands": [
"git-guard"
],
"tools": [
"git_guard_check",
"git_guard_scan",
"git_guard_enable"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@artale/pi-git-guard
Git safety guard for Pi coding agent. Prevents mistakes before they ship.
Commands
pi git-guard check → Git status, branch, staged files
pi git-guard scan → Scan staged files for secrets
pi git-guard enable → Install branch protection hooks
Tools
git_guard_check- Pre-flight check before commits/pushesgit_guard_scan- Detect leaked secrets in staged filesgit_guard_enable- One-time hook installation
Why
- Catch leaked API keys before they reach GitHub
- Prevent force-push disasters on main
- Warn on commits that are too large
- Zero config, opinionated defaults
Install
npm install -g @artale/pi-git-guard
Then in pi:
Use @artale/pi-git-guard
Detection
Scans for:
- OpenAI API keys (
sk-...) - GitHub tokens (
ghp_...) - Stripe keys (
sk_live_...,sk_test_...) - AWS access keys (
AKIA...) - Slack tokens (
xox[baprs]-...) - SSH private keys
- Hardcoded passwords/secrets
- Email:password patterns