aport-agent-guardrails vs destructive_command_guard
AI agent command guardrails compared
aport-agent-guardrails and destructive_command_guard both check AI agent actions before execution. APort evaluates supported tool calls against identity and policy, while dcg focuses on detecting destructive commands, especially in Git and filesystem operations.

aport-agent-guardrails: Authorize AI Agent Actions Before Execution
APort adds policy checks before supported AI agent tools run, helping teams limit prompt-injection risks and unauthorized actions. It provides runtime integrations and GitHub repository checks, with local or hosted verification options.

destructive_command_guard: Block Dangerous Commands Before Execution
dcg is a Rust hook that checks commands from AI coding agents before they run and blocks destructive operations. It suits developers who want guardrails against accidental data or work loss, with configurable coverage for additional tools and services.
| aport-agent-guardrails | destructive_command_guard | |
|---|---|---|
| Language | Shell | Rust |
| License | NOASSERTION | NOASSERTION |
| Stars | 27 | 6.1k |
| Forks | 4 | 252 |
| Last analyzed | Oct 4, 2026 | Oct 3, 2026 |
Key differences
- aport-agent-guardrails uses Open Agent Passport identity and policy artifacts; destructive_command_guard uses configurable rules to identify risky commands.
- aport-agent-guardrails integrates with agent frameworks and tools including LangChain and CrewAI; destructive_command_guard centers on command hooks and offers rule packs for databases, cloud tools, and containers.
- aport-agent-guardrails is written in Shell and offers local or hosted policy evaluation; destructive_command_guard is written in Rust and provides command inspection, explanation, and CI scanning.
- aport-agent-guardrails offers rollout modes that can report decisions or block actions; destructive_command_guard provides allowlists and per-rule policies, with configurable behavior when evaluation fails.
- Both list their license as NOASSERTION. aport-agent-guardrails has 27 stars and 4 forks, while destructive_command_guard has 6.1k stars and 252 forks.
Choose aport-agent-guardrails if you…
- need policy checks based on Open Agent Passport artifacts before supported tool calls run.
- want local offline evaluation or hosted verification, with audit logs and rollout modes.
- need repository checks through a generated GitHub Actions workflow.
Choose destructive_command_guard if you…
- want a command-focused guardrail for destructive Git and filesystem operations.
- need to inspect heredocs and inline scripts or explain why a command matches a rule.
- want optional rules for databases, cloud providers, infrastructure tools, or containers, plus CI scanning.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.