#315 · Primary category: AI Agents & Automation

destructive_command_guard

ai-agents cli developer-tools git rust safety

The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being executed by agents.

Project last updated:08/28/26

GitHub Stars

5.9K

Forks

239

Contributors

4

License

Other

Why we included this project

If you let AI coding agents run shell and git commands on your behalf, this guard gives you a cheap layer of insurance against the worst case: an agent deleting work it shouldn't. dcg installs as a hook across a long list of popular coding tools, including Claude Code, Codex, Gemini CLI, Copilot CLI, Cursor, and more, and intercepts destructive commands before they execute. Instead of a silent `git reset --hard` or `rm -rf`, you get a clear denial and a safer alternative. It ships as a compiled binary that auto-detects your platform, so setup is close to one command on Linux, macOS, or WSL, with a PowerShell installer covering native Windows. Teams that standardize on agent-based workflows will appreciate the per-agent profiles, which let you trust Claude Code more while restricting unknown agents, and the option to scan for dangerous commands in code review. If you have ever had to restore a repo after an over-eager agent ran a command you never approved, this is a pragmatic safety net worth trying before your next big refactor.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category