omp packages

@robhowley/pi-yolo-seatbelt0.5.0

Keep the YOLO workflow but avoid bash catastrophe with configurable guardrails for destructive commands.

GitHub Actions Published 2 months ago ~114 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-yolo-seatbelt

Safety guard for bash commands in Pi agents. Blocks or prompts for dangerous commands like rm -rf /, git reset --hard, etc. Permissions for each of the supported commands are fully configurable. Keep your session as loose or strict as desired.

Installation

pi install npm:@robhowley/pi-yolo-seatbelt

How It Works

yolo-seatbelt intercepts bash tool calls and evaluates commands against a set of safety rules:

  1. BLOCK - Immediate rejection (catastrophic patterns like rm -rf /)
  2. ASK - User confirmation (destructive patterns like git push --force)
  3. ALLOW - Command proceeds normally

Rule Categories

Category Rules Description
rm-rf-root rm -rf / delete entire filesystem
rm-rf-git rm -rf .git delete repository
rm-rf-home rm -rf ~ delete home directory
rm-rf rm -rf dangerous without path
find-delete find ... -delete delete via find
chmod-recursive chmod -R recursive permissions
chown-recursive chown -R recursive ownership
path.git .git directory access
path.ssh .ssh directory access
path.npmrc .npmrc file access
path.pypirc .pypirc file access
path.netrc .netrc file access
path.ssh-key .ssh SSH private keys
path.pem .pem certificate files
sudo Privilege escalation
git.reset-hard git reset --hard
git.clean-force git clean -f/d/x
git.push-force git push --force
git.push-force-with-lease git push --force-with-lease
git.rebase-interactive git rebase -i
git.filter-branch git filter-branch
git.update-ref git update-ref
git.reflog-expire git reflog expire

Configuration

Create ~/.pi/agent/yolo-seatbelt.json:

{
  "logLevel": "warn",
  "blockedTools": ["slack_post"],
  "rules": {
    "git.push-force": "allow",
    "rm-rf-root": "block"
  }
}

Protect yourself from bots sending embarrassing messages on your behalf:

A Slack message blocked by yolo-seatbelt

Config Schema

  • logLevel: "none" | "warn" | "debug" - Log level for debugging
  • blockedTools: string[] (default []) - Exact, case-sensitive tool names blocked at Pi's tool_call boundary. Tool inputs are not inspected.
  • rules: Record<string, "block" | "ask" | "allow"> - Override rule behavior by rule ID

Missing or invalid blockedTools values are ignored as an empty list.

Utility

View the active blocked tools, rule set, and permissions:

/yolo-seatbelt-rules