Shellfirm – a seatbelt for AI agents running shell commands Shellfirm, an open-source tool from developer Elad Kaplan, intercepts dangerous shell commands before AI agents or humans execute them, shipping with 496 built-in checks across 23 groups enabled by default. The tool installs shell hooks for 8 shells — Bash, Zsh, Fish, Elvish and Xonsh tested end to end, Nushell tested with a limitation, and PowerShell and Oils shipped but not yet tested — and escalates challenges based on context such as SSH sessions, root access, protected git branches and production Kubernetes clusters. Shellfirm also logs every intercepted command and decision as JSON lines with secrets redacted, and enforces team policies through a committed .shellfirm.yaml or an org-wide baseline at /etc/shellfirm/policy.yaml that personal settings cannot weaken. Think before you execute. Humans make mistakes. AI agents make them faster. shellfirm intercepts dangerous shell commands before the damage is done. % git push origin main --force ============ RISKY COMMAND DETECTED ============ Command: git push origin main --force Check: git:force push Severity: HIGH Blast radius: PROJECT — Force-pushes to origin/main Context: branch=main, target=main Description: This force-pushes and can overwrite remote history. Alternative: git push --force-with-lease Checks that your local ref is up-to-date before force pushing, preventing accidental overwrites of others' work. Escalated to Yes from Math : protected branch main HIGH Type yes to continue Esc or Ctrl-C to cancel This is real output, captured in zsh with default settings on the protected main branch. In bash the banner starts after a blank line. Off a protected branch the challenge is not escalated, and the banner also tells you how to stop being asked: shellfirm config ignore