Stack Gems
Menu
← Catalog

Destructive Command Guard

MIT-with-rider hook that blocks destructive agent shell and git commands

AI Agents / Agents · OSS/MIT · 6.2k

Reviewed 2026-09-22 · last push 2026-10-19 · repo checked 2026-10-19

What's Good

MIT with an OpenAI/Anthropic rider (Dicklesworthstone/destructive_command_guard). Rust hook with modular security packs (filesystem, git, k8s/helm, CI, cloud CLIs, and more), allowlists, ask-mode where the host supports it, and install paths across Claude Code, Codex CLI, Gemini CLI, Copilot CLI/Chat, Cursor, Hermes, OpenCode, Grok Build CLI, and related hook surfaces. Built for sub-millisecond blocking so agents do not feel a tax on every command.

The Catch

Vs sandbox products (E2B/Daytona/AgentBox) and Pi containerization docs: dcg is a deny-list hook on the host agent, not a VM/microVM boundary. The license rider voids rights for OpenAI, Anthropic, and their affiliates/agents — fine for most operators, a hard stop if you are those orgs or building their eval pipelines. Packs can be disabled incorrectly; treat "disabled packs" behavior as something you verify, and remember a hook is only as strong as the agent actually invoking it.

Verdict

MIT-with-rider destructive-command hook. Strong default safety net for local coding agents; read the OpenAI/Anthropic rider before corporate adoption.

Embed

Maintainer? Add the badge to your README. It is free, links to this review, and there is no paid version.

Reviewed on Stack Gems

Markdown

[![Reviewed on Stack Gems](https://stackgems.com/badge/destructive-command-guard.svg)](https://stackgems.com/gems/destructive-command-guard)

HTML

<a href="https://stackgems.com/gems/destructive-command-guard"><img src="https://stackgems.com/badge/destructive-command-guard.svg" alt="Destructive Command Guard reviewed on Stack Gems" height="20"></a>