█

AI/TLDR

Dicklesworthstone · 13 जुल॰ 2026 · प्रमुख

Destructive Command Guard — AI एजेंट को rm -rf चलाने से रोकने वाला Rust hook

संक्षेप में

Destructive Command Guard (dcg) एक Rust hook है, जो AI coding एजेंट के खतरनाक shell और git कमांड को चलने से पहले रोक लेता है। v0.6.6 13 जुलाई को जारी हुआ और DCG GitHub Trending में #1 पर पहुँच गया।

Dicklesworthstone · 13 जुल॰ 2026 · 2 जाँचे गए स्रोत

Destructive Command Guard repo card — Rust hook to block dangerous commands from AI agents

एक Rust hook जो AI coding एजेंट को rm -rf ./src या git reset --hard जैसी कमांड चलाने से रोकता है।

मुख्य स्पेक्स

GitHub स्टार4,000+
Latencysub-millisecond

मुख्य तथ्य

बनाने वालेJeffrey Emanuel (Dicklesworthstone)
भाषाRust (edition 2024)
लाइसेंसMIT
नवीनतम रिलीज़v0.6.6, 13 जुलाई 2026
Latencyहर कमांड पर sub-millisecond
किनके साथ चलता हैClaude Code, Codex CLI, Cursor, Gemini CLI, Copilot CLI, Aider, OpenCode
इंस्टॉल कैसे करेंcargo install destructive_command_guard, या prebuilt binaries

यह क्या है?

Destructive Command Guard AI coding एजेंट और आपके shell के बीच एक सेफ्टी नेट जोड़ता है। यह PreToolUse hook के रूप में चलता है: एजेंट जो भी कमांड चलाना चाहता है, वह पहले DCG से होकर गुजरती है, और DCG उन कमांड को रोक देता है जो काम को नष्ट कर सकती हैं। Version 0.6.6 13 जुलाई 2026 को जारी हुआ और repo पर ~4,000 स्टार हैं।

यह कैसे काम करता है?

हर कमांड को चार चरणों की pipeline से गुज़ारा जाता है: JSON parse, normalize (heredocs और inline scripts को खोलना), SIMD-accelerated quick reject, और 50+ 'packs' के खतरनाक patterns के खिलाफ regex मिलान। सुरक्षित कमांड माइक्रोसेकंड में मंज़ूर हो जाती हैं। खतरनाक कमांड का मिलान denylist से होता है, जो rm, git, database drops, Kubernetes, cloud CLIs और CI/CD को कवर करती है, और उन्हें आसानी से समझ आने वाले कारण के साथ लौटाया जाता है।

यह क्यों मायने रखता है?

AI coding एजेंट shell कमांड अपने आप चलाते हैं, और कभी-कभी ज़रूरत से ज़्यादा रचनात्मक हो जाते हैं: एक rename जो rm -rf बन जाता है, एक merge जो git reset --hard बन जाता है, या एक schema fix जो table ही drop कर देता है। DCG एक सीटबेल्ट की तरह है: इंस्टॉल करना आसान और सस्ता, गलत इस्तेमाल मुश्किल, और यह एजेंट के काम करने के तरीके को बदले बिना Claude Code, Codex CLI, Cursor, Gemini CLI, Copilot CLI, Aider, OpenCode और Grok Build CLI से जुड़ जाता है।

यह किसके लिए है?

असली repos में autonomous AI coding एजेंट चलाने वाले developers

अक्सर पूछे जाने वाले प्रश्न

Destructive Command Guard क्या ब्लॉक करता है?
Destructive Command Guard में खतरनाक shell और git patterns की denylist आती है: source paths पर rm -rf, uncommitted काम पर git reset --hard, git checkout -- ., DROP TABLE, protected branches पर force pushes, और भी बहुत कुछ। बाकी सब डिफ़ॉल्ट रूप से पास हो जाता है। denylist को database, Kubernetes, cloud providers और CI/CD के लिए modular 'packs' में बाँटा गया है।
DCG Claude Code और दूसरे एजेंट से कैसे जुड़ता है?
DCG एक PreToolUse hook के रूप में चलता है, जिसे coding एजेंट किसी भी shell कमांड को चलाने से पहले कॉल करता है। Claude Code, Codex CLI 0.125.0+, Cursor, Gemini CLI, Copilot CLI, Aider, OpenCode और Grok Build CLI, सभी DCG को कॉल कर सकते हैं। अगर पैटर्न किसी destructive नियम से मेल खाता है, तो DCG कारण के साथ deny लौटाता है; वरना कमांड चल जाती है।
Destructive Command Guard कितना तेज़ है?
Destructive Command Guard हर कमांड पर sub-millisecond latency का दावा करता है। चार चरणों की pipeline (JSON parsing, normalization, SIMD-accelerated quick reject, फिर regex matching) 95% से ज़्यादा कमांड को 10 microseconds से कम में पास कर देती है, और केवल खतरनाक keywords वाली कमांड ही महंगे regex चरण तक पहुँचती हैं।
क्या Destructive Command Guard ओपन सोर्स और मुफ़्त है?
हाँ। DCG MIT लाइसेंस के तहत है। Linux x86_64 और ARM64, macOS Intel और Apple Silicon, तथा Windows के लिए prebuilt binaries उपलब्ध हैं। Rust source GitHub पर है और crate crates.io पर है। कोई paid tier नहीं है: पूरा tool एक static binary के रूप में आता है, जिसे आप अपने एजेंट के PreToolUse hook में डाल देते हैं।

आज़माएँ

cargo install destructive_command_guard

स्रोत · 2 outlets

टैग

  • टूल
  • repo
  • safety
  • hook
  • rust
  • claude-code
  • codex-cli
  • cursor
  • gemini-cli
  • coding-agent
  • shell
  • git
// कोई रिलीज़ न चूकेंहर AI रिलीज़ पाएँ, आते हीमुफ़्त Telegram चैनल · 1 पंक्ति के TLDR · ईमेल नहींTelegram पर जुड़ें

← सभी रिलीज़ · AI सीखें