Intercept risky rm commands on your VPS with email approval. Perfect for AI coding agents (Claude Code, Cursor, etc.) that execute commands on production servers.
# safe-rm
[](LICENSE)
[](https://nodejs.org/)
[](https://www.python.org/)
**Email approval for risky `rm` commands. Built for AI coding agents on production servers.**
---
## The Problem
AI coding agents (Claude Code, Cursor, Cursor) can execute destructive commands on your server. One `rm -rf` gone wrong can wipe production data. You need a human-in-the-loop safety net that works without babysitting a terminal.
## The Solution
safe-rm intercepts risky deletions and requires email approval before proceeding. It replaces `rm` on your server with a thin wrapper that detects dangerous commands, sends you an email with Approve/Deny buttons, and waits for your response before executing anything.
## How It Works
```
VPS (your server) Your Infrastructure
─────────────────── ────────────────────
AI Agent runs:
rm -rf /var/www/data
│
▼
┌─────────────┐ HMAC-signed ┌──────────────────┐
│ safe-rm │ ──── POST ──────► │ Approval Server │
│ (Python) │ │ (Express.js) │
│ │ │ │
│ Polls for │ ◄─── GET ──────── │ Creates request │
│ status... │ /status │ with tokens │
└─────────────┘ └────────┬─────────┘
│ │
│ Webhook (POST)
│ │
│ ▼
│ ┌────────────────┐
│ │ n8n │
│ │ (automation) │
│ └────────┬───────┘
│ │
│ Agent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.