GitHot
返回日報

Dicklesworthstone/destructive_command_guard

Rust
開啟 GitHub

防止 AI 代理意外删除代碼的高效守護

Destructive Command Guard - Protecting your code from accidental destruction

專案資訊

專案簡介

dcg 是一個高效的 hook,阻止 AI 代理執行危險的 git 與 shell 命令,保護開發者的未提交工作。

AI 快速摘要

  1. 阻止危險 git 命令
  2. 支援多種 AI 代理
  3. 零配置即用

核心特色

1. Zero-Config Protection

阻止危險 git 與檔案系統指令

適合場景:AI 代理執行 git reset --hard

分析依據:README: Zero-Config Protection · 可信程度:高

自動啟用

2. 50+ Security Packs

包含資料庫、K8s、雲端等防護

適合場景:DROP TABLE、kubectl delete

分析依據:config.toml 示例 · 可信程度:高

自動載入

3. Sub-Millisecond Latency

SIMD 加速過濾

適合場景:命令即時阻止

分析依據:README: Sub-Millisecond Latency · 可信程度:高

毫秒級

可用範圍

適合使用

  • AI 代理開發者
  • CI/CD 工程
  • 本地開發環境
  • 跨平台 (Linux/macOS/WSL)

不適合使用

  • 無法安裝的 Windows 原生
  • 需要高級自訂的企業系統

可延伸應用

  • VS Code Copilot Chat
  • Cursor IDE
  • Hermes Agent
  • Grok (xAI)

適合哪些人

使用者類型 適合程度 原因
beginner low 零配置即用
intermediate medium 支援多種 AI 代理
advanced high 可自訂 rule packs
CI engineer high CI 監控阻止
AI developer high 即時防護
local dev medium 跨平台支援

技術架構

主要技術

  • Languages:Rust
  • Frameworks:none
  • Database:none
  • Deployment:local
  • Platforms:Linux, macOS, Windows (WSL)
  • API:none

運作流程

  1. detect command
  2. block command
  3. output denial

安裝與使用難度

  • Install:easy
  • Docs:medium
  • Docker:no
  • Examples:yes
  • Hardware:none
  • Learning curve:low

基本使用流程

  1. download install.sh
  2. run bash install.sh --easy-mode
  3. verify installation

專案優點

  • 零配置
  • 高效
  • 跨平台
  • 說明清晰

限制與注意事項

  • 僅阻止已知危險命令
  • 依賴 AI 代理支援
  • Windows 原生依賴 cosign

維護狀態分析

  • Last commit:無法確認
  • Release cadence:每月一次
  • Issues:快速回應
  • PRs:自動合併
  • Contributors:少數
  • Status:活躍

無法確認

AI 綜合評價

推薦指數:★★★★☆ (4/5)

推薦理由:適合 AI 開發者快速保護代碼

最適合的應用方向

  • AI 代理開發
  • CI 審核
  • 本地開發

導入前應確認

  • 安裝成功
  • 命令被阻止
  • 輸出說明
  • 跨平台

結論

dcg 為 AI 開發者的安全守護者

本文部分內容由 AI 根據 GitHub Repository、README、文件與公開資訊分析產生。實際使用前,仍應查閱專案官方文件與授權條款。