gitstq/AIGuard-CLI

GitHub: gitstq/AIGuard-CLI

Stars: 0 | Forks: 0

简体中文  |  繁體中文  |  English

# AIGuard-CLI **轻量级终端 AI 内容安全合规检测引擎**
## 简体中文 ### 🎉 项目介绍 AIGuard-CLI 是一款专为开发者打造的轻量级终端 AI 内容安全合规检测引擎。它内置 **104 条检测规则**,覆盖 **6 大安全类别**,能够高效识别文本中的有害内容、偏见歧视、隐私泄露、虚假信息、安全漏洞及不当内容。 项目采用纯 Python 实现,**零外部依赖**,开箱即用。无论是接入 CI/CD 流水线做内容合规把关,还是在本地开发时快速扫描文本,AIGuard-CLI 都能胜任。 **核心亮点:** - **104 条内置规则** — 覆盖 6 大安全检测类别 - **112 个单元测试全部通过** — 质量可靠有保障 - **零外部依赖** — 纯标准库实现,安装即用 - **混合检测引擎** — 正则匹配 + 关键词检索 + 上下文语义分析 - **风险评分系统** — 0-100 分量化评估内容风险等级 - **多格式报告输出** — 支持 JSON / HTML / Markdown / Text - **交互式 TUI 仪表盘** — 终端内可视化查看检测结果 - **完善的中文支持** — 针对中文文本场景深度优化 ### ✨ 核心特性 | 特性 | 说明 | |------|------| | 🔒 零外部依赖 | 纯 Python 标准库实现,无需安装任何第三方包 | | 🧠 混合检测引擎 | 正则匹配 + 关键词检索 + 上下文语义分析三重检测 | | 📊 风险评分系统 | 0-100 分量化评估,直观呈现内容风险等级 | | 📋 多格式报告 | JSON / HTML / Markdown / Text 四种格式自由选择 | | 🖥️ 交互式 TUI 仪表盘 | 终端内可视化面板,实时查看检测统计与详情 | | 🇨🇳 中文文本优化 | 针对中文语境深度优化,识别更精准 | | 🎨 彩色终端输出 | 红/黄/绿三色标注,一眼区分风险等级 | | 📁 批量扫描 | 支持目录级批量扫描,高效处理大量文件 | | 🔧 自定义规则 | 灵活添加自定义检测规则,满足个性化需求 | | 🔗 管道模式 | 支持 stdin 管道输入,无缝融入 Unix 工作流 | ### 🚀 快速开始 #### 环境要求 - **Python** >= 3.8 - **操作系统**:Windows / macOS / Linux - **外部依赖**:无 #### 安装 # 克隆仓库 git clone https://github.com/gitstq/AIGuard-CLI.git cd AIGuard-CLI # 无需安装依赖,直接使用 python3 cli.py --version #### 基本使用 **扫描一段文本:** python3 cli.py scan "这是一段需要检测的文本内容" **扫描文件:** python3 cli.py scan --file document.txt **批量扫描目录:** python3 cli.py scan --dir ./documents **管道模式:** echo "待检测文本" | python3 cli.py scan --stdin cat article.txt | python3 cli.py scan --stdin **查看内置规则:** python3 cli.py rules list **添加自定义规则:** python3 cli.py rules add custom_rules.json **生成检测报告:** python3 cli.py report --format html --output report.html **启动交互式仪表盘:** python3 cli.py dashboard **查看当前配置:** python3 cli.py config --show ### 📖 详细使用指南 #### 六大检测类别 AIGuard-CLI 内置 104 条检测规则,覆盖以下 6 大安全类别: | # | 类别 | 规则数 | 检测范围 | |---|------|--------|----------| | 1 | 🛡️ 有害内容检测 | 18 | 暴力威胁、仇恨言论、自残、恐怖主义、欺凌等 | | 2 | ⚖️ 偏见歧视检测 | 16 | 种族、性别、年龄、宗教、残疾等歧视性内容 | | 3 | 🔐 隐私信息检测 | 18 | 邮箱、手机号、身份证号、银行卡号、IP 地址等 | | 4 | 📰 虚假信息检测 | 16 | 绝对化用语、虚假医疗声明、虚假金融承诺等 | | 5 | 💻 安全漏洞检测 | 18 | SQL 注入、XSS、命令注入、路径遍历等 | | 6 | ⚠️ 不当内容检测 | 18 | 成人内容、赌博、毒品、勒索等 | #### 风险评分说明 检测结果会给出 **0-100** 的风险评分: - **0-25**:🟢 低风险 — 内容安全,无需处理 - **26-50**:🟡 中风险 — 存在轻微问题,建议关注 - **51-75**:🟠 高风险 — 存在明显违规,需要处理 - **76-100**:🔴 极高风险 — 严重违规,必须立即处理 #### 自定义规则 你可以通过 JSON 文件添加自定义检测规则: { "rules": [ { "id": "custom-001", "name": "自定义敏感词", "category": "harmful", "pattern": "禁止词汇", "severity": "high", "description": "检测自定义敏感词" } ] } python3 cli.py rules add my_rules.json #### 报告输出 支持四种报告格式,满足不同场景需求: # JSON 格式 — 适合程序化处理 python3 cli.py report --format json --output report.json # HTML 格式 — 适合浏览器查看与分享 python3 cli.py report --format html --output report.html # Markdown 格式 — 适合文档集成 python3 cli.py report --format markdown --output report.md # Text 格式 — 适合终端直接查看 python3 cli.py report --format text --output report.txt ### 💡 设计思路与迭代规划 #### 设计理念 AIGuard-CLI 的核心设计理念是 **「轻量、可靠、易用」**: 1. **零依赖策略** — 全部基于 Python 标准库实现,消除环境配置成本,确保在任何 Python 环境下都能稳定运行。 2. **混合检测引擎** — 单一检测手段存在局限性,因此采用正则匹配、关键词检索与上下文语义分析相结合的方式,兼顾准确率与召回率。 3. **风险量化评估** — 通过 0-100 的评分体系将检测结果量化,帮助用户快速判断内容风险等级,而非简单的「通过/不通过」。 4. **开发者友好** — 提供 CLI、TUI、管道模式等多种交互方式,无缝融入开发者的日常工作流。 #### 后续规划 - [ ] **v1.1** — 支持自定义规则热加载,无需重启即可更新规则 - [ ] **v1.2** — 新增 YAML 格式规则文件支持 - [ ] **v1.3** — 提供 Docker 镜像,简化部署流程 - [ ] **v2.0** — 引入轻量级 NLP 模型,提升语义理解能力 - [ ] **v2.1** — 支持 Webhook 回调,集成 CI/CD 流水线 - [ ] **v2.2** — 提供多语言 SDK(JavaScript / Go / Rust) ### 📦 打包与部署指南 #### 使用 pip 安装 cd AIGuard-CLI pip install . 安装完成后,可直接使用 `aiguard` 命令: aiguard scan "检测这段文本" #### 构建 Wheel 包 pip install build python3 -m build 构建产物位于 `dist/` 目录下: dist/ ├── aiguard_cli-1.0.0-py3-none-any.whl └── aiguard-cli-1.0.0.tar.gz #### Docker 部署(规划中) # 构建镜像 docker build -t aiguard-cli . # 运行扫描 docker run --rm aiguard-cli scan "待检测文本" ### 🤝 贡献指南 我们欢迎并感谢每一位贡献者!参与贡献的流程如下: 1. **Fork** 本仓库 2. 创建特性分支:`git checkout -b feature/my-new-feature` 3. 提交更改:`git commit -m "Add some feature"` 4. 推送分支:`git push origin feature/my-new-feature` 5. 提交 **Pull Request** #### 开发规范 - 代码风格遵循 **PEP 8** - 提交前请确保所有测试通过:`python3 -m pytest tests/ -v` - 新增规则需同步添加对应的单元测试 - 提交信息请使用清晰、简洁的描述 #### 运行测试 # 运行全部测试 python3 -m pytest tests/ -v # 运行单个测试文件 python3 -m pytest tests/test_detector.py -v # 查看测试覆盖率(需安装 pytest-cov) python3 -m pytest tests/ --cov=aiguard --cov-report=term-missing ### 📄 开源协议 本项目基于 [MIT License](https://opensource.org/licenses/MIT) 开源。 MIT License Copyright (c) 2024 AIGuard Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Made with ❤️ by [AIGuard Team](https://github.com/gitstq/AIGuard-CLI)
# AIGuard-CLI **輕量級終端 AI 內容安全合規檢測引擎**
## 繁體中文 ### 🎉 專案介紹 AIGuard-CLI 是一款專為開發者打造的輕量級終端 AI 內容安全合規檢測引擎。它內建 **104 條檢測規則**,覆蓋 **6 大安全類別**,能夠高效識別文字中的有害內容、偏見歧視、隱私洩露、虛假資訊、安全漏洞及不當內容。 專案採用純 Python 實作,**零外部依賴**,開箱即用。無論是接入 CI/CD 流水線做內容合規把關,還是在本地開發時快速掃描文字,AIGuard-CLI 都能勝任。 **核心亮點:** - **104 條內建規則** — 覆蓋 6 大安全檢測類別 - **112 個單元測試全部通過** — 品質可靠有保障 - **零外部依賴** — 純標準庫實作,安裝即用 - **混合檢測引擎** — 正則匹配 + 關鍵詞檢索 + 上下文語義分析 - **風險評分系統** — 0-100 分量化評估內容風險等級 - **多格式報告輸出** — 支援 JSON / HTML / Markdown / Text - **互動式 TUI 儀表盤** — 終端內視覺化查看檢測結果 - **完善的中文支援** — 針對中文文字場景深度優化 ### ✨ 核心特性 | 特性 | 說明 | |------|------| | 🔒 零外部依賴 | 純 Python 標準庫實作,無需安裝任何第三方套件 | | 🧠 混合檢測引擎 | 正則匹配 + 關鍵詞檢索 + 上下文語義分析三重檢測 | | 📊 風險評分系統 | 0-100 分量化評估,直觀呈現內容風險等級 | | 📋 多格式報告 | JSON / HTML / Markdown / Text 四種格式自由選擇 | | 🖥️ 互動式 TUI 儀表盤 | 終端內視覺化面板,即時查看檢測統計與詳情 | | 🇨🇳 中文文字優化 | 針對中文語境深度優化,識別更精準 | | 🎨 彩色終端輸出 | 紅/黃/綠三色標註,一眼區分風險等級 | | 📁 批量掃描 | 支援目錄級批量掃描,高效處理大量檔案 | | 🔧 自訂規則 | 靈活新增自訂檢測規則,滿足個性化需求 | | 🔗 管道模式 | 支援 stdin 管道輸入,無縫融入 Unix 工作流 | ### 🚀 快速開始 #### 環境要求 - **Python** >= 3.8 - **作業系統**:Windows / macOS / Linux - **外部依賴**:無 #### 安裝 # 複製倉庫 git clone https://github.com/gitstq/AIGuard-CLI.git cd AIGuard-CLI # 無需安裝依賴,直接使用 python3 cli.py --version #### 基本使用 **掃描一段文字:** python3 cli.py scan "這是一段需要檢測的文字內容" **掃描檔案:** python3 cli.py scan --file document.txt **批量掃描目錄:** python3 cli.py scan --dir ./documents **管道模式:** echo "待檢測文字" | python3 cli.py scan --stdin cat article.txt | python3 cli.py scan --stdin **查看內建規則:** python3 cli.py rules list **新增自訂規則:** python3 cli.py rules add custom_rules.json **產生檢測報告:** python3 cli.py report --format html --output report.html **啟動互動式儀表盤:** python3 cli.py dashboard **查看目前設定:** python3 cli.py config --show ### 📖 詳細使用指南 #### 六大檢測類別 AIGuard-CLI 內建 104 條檢測規則,覆蓋以下 6 大安全類別: | # | 類別 | 規則數 | 檢測範圍 | |---|------|--------|----------| | 1 | 🛡️ 有害內容檢測 | 18 | 暴力威脅、仇恨言論、自殘、恐怖主義、欺凌等 | | 2 | ⚖️ 偏見歧視檢測 | 16 | 種族、性別、年齡、宗教、身心障礙等歧視性內容 | | 3 | 🔐 隱私資訊檢測 | 18 | 電子郵件、手機號碼、身分證字號、銀行卡號、IP 位址等 | | 4 | 📰 虛假資訊檢測 | 16 | 絕對化用語、虛假醫療聲明、虛假金融承諾等 | | 5 | 💻 安全漏洞檢測 | 18 | SQL 注入、XSS、命令注入、路徑遍歷等 | | 6 | ⚠️ 不當內容檢測 | 18 | 成人內容、賭博、毒品、勒索等 | #### 風險評分說明 檢測結果會給出 **0-100** 的風險評分: - **0-25**:🟢 低風險 — 內容安全,無需處理 - **26-50**:🟡 中風險 — 存在輕微問題,建議關注 - **51-75**:🟠 高風險 — 存在明顯違規,需要處理 - **76-100**:🔴 極高風險 — 嚴重違規,必須立即處理 #### 自訂規則 你可以透過 JSON 檔案新增自訂檢測規則: { "rules": [ { "id": "custom-001", "name": "自訂敏感詞", "category": "harmful", "pattern": "禁止詞彙", "severity": "high", "description": "檢測自訂敏感詞" } ] } python3 cli.py rules add my_rules.json #### 報告輸出 支援四種報告格式,滿足不同場景需求: # JSON 格式 — 適合程式化處理 python3 cli.py report --format json --output report.json # HTML 格式 — 適合瀏覽器查看與分享 python3 cli.py report --format html --output report.html # Markdown 格式 — 適合文件整合 python3 cli.py report --format markdown --output report.md # Text 格式 — 適合終端直接查看 python3 cli.py report --format text --output report.txt ### 💡 設計思路與迭代規劃 #### 設計理念 AIGuard-CLI 的核心設計理念是 **「輕量、可靠、易用」**: 1. **零依賴策略** — 全部基於 Python 標準庫實作,消除環境配置成本,確保在任何 Python 環境下都能穩定運行。 2. **混合檢測引擎** — 單一檢測手段存在侷限性,因此採用正則匹配、關鍵詞檢索與上下文語義分析相結合的方式,兼顧準確率與召回率。 3. **風險量化評估** — 透過 0-100 的評分體系將檢測結果量化,幫助使用者快速判斷內容風險等級,而非簡單的「通過/不通過」。 4. **開發者友善** — 提供 CLI、TUI、管道模式等多種互動方式,無縫融入開發者的日常工作流。 #### 後續規劃 - [ ] **v1.1** — 支援自訂規則熱載入,無需重啟即可更新規則 - [ ] **v1.2** — 新增 YAML 格式規則檔案支援 - [ ] **v1.3** — 提供 Docker 映像檔,簡化部署流程 - [ ] **v2.0** — 引入輕量級 NLP 模型,提升語義理解能力 - [ ] **v2.1** — 支援 Webhook 回呼,整合 CI/CD 流水線 - [ ] **v2.2** — 提供多語言 SDK(JavaScript / Go / Rust) ### 📦 打包與部署指南 #### 使用 pip 安裝 cd AIGuard-CLI pip install . 安裝完成後,可直接使用 `aiguard` 命令: aiguard scan "檢測這段文字" #### 建構 Wheel 套件 pip install build python3 -m build 建構產物位於 `dist/` 目錄下: dist/ ├── aiguard_cli-1.0.0-py3-none-any.whl └── aiguard-cli-1.0.0.tar.gz #### Docker 部署(規劃中) # 建構映像檔 docker build -t aiguard-cli . # 執行掃描 docker run --rm aiguard-cli scan "待檢測文字" ### 🤝 貢獻指南 我們歡迎並感謝每一位貢獻者!參與貢獻的流程如下: 1. **Fork** 本倉庫 2. 建立特性分支:`git checkout -b feature/my-new-feature` 3. 提交變更:`git commit -m "Add some feature"` 4. 推送分支:`git push origin feature/my-new-feature` 5. 提交 **Pull Request** #### 開發規範 - 程式碼風格遵循 **PEP 8** - 提交前請確保所有測試通過:`python3 -m pytest tests/ -v` - 新增規則需同步新增對應的單元測試 - 提交資訊請使用清晰、簡潔的描述 #### 執行測試 # 執行全部測試 python3 -m pytest tests/ -v # 執行單一測試檔案 python3 -m pytest tests/test_detector.py -v # 查看測試覆蓋率(需安裝 pytest-cov) python3 -m pytest tests/ --cov=aiguard --cov-report=term-missing ### 📄 開源協議 本專案基於 [MIT License](https://opensource.org/licenses/MIT) 開源。 MIT License Copyright (c) 2024 AIGuard Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Made with ❤️ by [AIGuard Team](https://github.com/gitstq/AIGuard-CLI)
# AIGuard-CLI **Lightweight Terminal AI Content Safety Compliance Detection Engine**
## English ### 🎉 Introduction AIGuard-CLI is a lightweight terminal-based AI content safety compliance detection engine built for developers. It comes with **104 built-in detection rules** across **6 major security categories**, capable of efficiently identifying harmful content, bias and discrimination, privacy leaks, misinformation, security vulnerabilities, and inappropriate content in text. Built entirely in pure Python with **zero external dependencies**, it works right out of the box. Whether you need to integrate content compliance checks into your CI/CD pipeline or quickly scan text during local development, AIGuard-CLI has you covered. **Key Highlights:** - **104 Built-in Rules** — Covering 6 major security detection categories - **112 Unit Tests All Passing** — Reliable and well-tested - **Zero External Dependencies** — Pure standard library implementation - **Hybrid Detection Engine** — Regex matching + keyword search + contextual analysis - **Risk Scoring System** — Quantified 0-100 risk assessment - **Multi-format Reports** — JSON / HTML / Markdown / Text output - **Interactive TUI Dashboard** — Visualize detection results in your terminal - **Chinese Text Support** — Deeply optimized for Chinese text scenarios ### ✨ Core Features | Feature | Description | |---------|-------------| | 🔒 Zero Dependencies | Pure Python standard library — no third-party packages required | | 🧠 Hybrid Detection Engine | Triple-layer detection: regex + keyword + contextual semantic analysis | | 📊 Risk Scoring System | 0-100 quantified assessment for intuitive risk visualization | | 📋 Multi-format Reports | Choose from JSON / HTML / Markdown / Text formats | | 🖥️ Interactive TUI Dashboard | In-terminal visual panel for real-time detection statistics | | 🇨🇳 Chinese Text Optimization | Deeply optimized for Chinese language contexts | | 🎨 Colorized Terminal Output | Red/Yellow/Green color coding for instant risk level identification | | 📁 Batch Scanning | Directory-level batch scanning for efficient large-scale processing | | 🔧 Custom Rules | Flexible custom rule definitions to meet your specific needs | | 🔗 Pipe Mode | stdin pipe input support for seamless Unix workflow integration | ### 🚀 Quick Start #### Prerequisites - **Python** >= 3.8 - **OS**: Windows / macOS / Linux - **External Dependencies**: None #### Installation # Clone the repository git clone https://github.com/gitstq/AIGuard-CLI.git cd AIGuard-CLI # No dependencies to install — ready to use python3 cli.py --version #### Basic Usage **Scan a text string:** python3 cli.py scan "This is a text string to scan for safety issues" **Scan a file:** python3 cli.py scan --file document.txt **Batch scan a directory:** python3 cli.py scan --dir ./documents **Pipe mode:** echo "Text to scan" | python3 cli.py scan --stdin cat article.txt | python3 cli.py scan --stdin **List built-in rules:** python3 cli.py rules list **Add custom rules:** python3 cli.py rules add custom_rules.json **Generate a report:** python3 cli.py report --format html --output report.html **Launch the interactive dashboard:** python3 cli.py dashboard **View current configuration:** python3 cli.py config --show ### 📖 Detailed Usage Guide #### Six Detection Categories AIGuard-CLI includes 104 built-in detection rules across 6 major security categories: | # | Category | Rules | Detection Scope | |---|----------|-------|-----------------| | 1 | 🛡️ Harmful Content | 18 | Violence, hate speech, self-harm, terrorism, bullying, etc. | | 2 | ⚖️ Bias & Discrimination | 16 | Racial, gender, age, religious, disability discrimination, etc. | | 3 | 🔐 Privacy Information | 18 | Email, phone numbers, ID numbers, bank cards, IP addresses, etc. | | 4 | 📰 Misinformation | 16 | Absolute claims, false medical statements, financial fraud, etc. | | 5 | 💻 Security Vulnerabilities | 18 | SQL injection, XSS, command injection, path traversal, etc. | | 6 | ⚠️ Inappropriate Content | 18 | Adult content, gambling, drugs, extortion, etc. | #### Risk Score Guide Detection results include a **0-100** risk score: - **0-25**: 🟢 Low Risk — Content is safe, no action needed - **26-50**: 🟡 Medium Risk — Minor issues detected, review recommended - **51-75**: 🟠 High Risk — Clear violations found, action required - **76-100**: 🔴 Critical Risk — Severe violations, immediate action required #### Custom Rules You can add custom detection rules via a JSON file: { "rules": [ { "id": "custom-001", "name": "Custom Sensitive Word", "category": "harmful", "pattern": "forbidden-term", "severity": "high", "description": "Detect custom sensitive words" } ] } python3 cli.py rules add my_rules.json #### Report Output Four report formats are supported for different use cases: # JSON format — ideal for programmatic processing python3 cli.py report --format json --output report.json # HTML format — ideal for browser viewing and sharing python3 cli.py report --format html --output report.html # Markdown format — ideal for documentation integration python3 cli.py report --format markdown --output report.md # Text format — ideal for direct terminal viewing python3 cli.py report --format text --output report.txt ### 💡 Design Philosophy & Roadmap #### Design Principles AIGuard-CLI is built around three core principles: **Lightweight, Reliable, and Easy to Use**. 1. **Zero-Dependency Strategy** — Built entirely on the Python standard library, eliminating environment configuration costs and ensuring stable operation in any Python environment. 2. **Hybrid Detection Engine** — A single detection method has inherent limitations. We combine regex matching, keyword search, and contextual semantic analysis to balance precision and recall. 3. **Quantified Risk Assessment** — Instead of a simple pass/fail, the 0-100 scoring system quantifies detection results, helping users quickly gauge content risk levels. 4. **Developer-Friendly** — Multiple interaction modes (CLI, TUI, pipe) seamlessly integrate into developers' daily workflows. #### Roadmap - [ ] **v1.1** — Hot-reloading for custom rules (no restart needed) - [ ] **v1.2** — YAML format rule file support - [ ] **v1.3** — Docker image for simplified deployment - [ ] **v2.0** — Lightweight NLP model integration for enhanced semantic understanding - [ ] **v2.1** — Webhook callbacks for CI/CD pipeline integration - [ ] **v2.2** — Multi-language SDKs (JavaScript / Go / Rust) ### 📦 Packaging & Deployment Guide #### Install via pip cd AIGuard-CLI pip install . After installation, use the `aiguard` command directly: aiguard scan "Scan this text" #### Build a Wheel Package pip install build python3 -m build Build artifacts are located in the `dist/` directory: dist/ ├── aiguard_cli-1.0.0-py3-none-any.whl └── aiguard-cli-1.0.0.tar.gz #### Docker Deployment (Planned) # Build the image docker build -t aiguard-cli . # Run a scan docker run --rm aiguard-cli scan "Text to scan" #### Development Standards #### Running Tests # Run all tests python3 -m pytest tests/ -v # Run a single test file python3 -m pytest tests/test_detector.py -v # Check test coverage (requires pytest-cov) python3 -m pytest tests/ --cov=aiguard --cov-report=term-missing ### 📄 License This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). MIT License Copyright (c) 2024 AIGuard Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Made with ❤️ by [AIGuard Team](https://github.com/gitstq/AIGuard-CLI)