{"id":51026708,"url":"https://github.com/gitstq/devmetrics-cli","last_synced_at":"2026-06-21T20:02:14.560Z","repository":{"id":361172032,"uuid":"1247507456","full_name":"gitstq/devmetrics-cli","owner":"gitstq","description":"🔥 轻量级开发者代码度量与生产力分析引擎 | Lightweight Developer Code Metrics \u0026 Productivity Analysis Engine - Zero Dependencies","archived":false,"fork":false,"pushed_at":"2026-05-29T12:09:15.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-29T14:06:34.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitstq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T12:09:46.000Z","updated_at":"2026-05-23T12:09:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/devmetrics-cli","commit_stats":null,"previous_names":["gitstq/devmetrics-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/devmetrics-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fdevmetrics-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fdevmetrics-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fdevmetrics-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fdevmetrics-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/devmetrics-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fdevmetrics-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T20:02:13.750Z","updated_at":"2026-06-21T20:02:14.554Z","avatar_url":"https://github.com/gitstq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🔥 DevMetrics-CLI\n\n**轻量级开发者代码度量与生产力分析引擎**\n\n*Lightweight Developer Code Metrics \u0026 Productivity Analysis Engine*\n\n[![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/Version-1.0.0-orange.svg)]()\n[![Zero Dependencies](https://img.shields.io/badge/Zero-Dependencies-brightgreen.svg)]()\n\n[简体中文](#简体中文) | [繁體中文](#繁體中文) | [English](#english)\n\n\u003c/div\u003e\n\n---\n\n\u003ca name=\"简体中文\"\u003e\u003c/a\u003e\n## 🇨🇳 简体中文\n\n### 🎉 项目介绍\n\n**DevMetrics-CLI** 是一款专为开发者打造的轻量级代码度量与生产力分析工具。它通过分析 Git 提交历史，帮助开发者深入了解自己的编码习惯、时间分布、语言偏好和贡献模式。\n\n**灵感来源**：在 AI 辅助编程时代，开发者需要更好地了解自己的编码行为模式，以便优化工作效率和提升代码质量。\n\n**自研差异化亮点**：\n- 🚀 **零依赖设计** - 仅使用 Python 标准库，无需安装任何第三方包\n- 📊 **终端可视化** - 精美的命令行图表和热力图展示\n- ⚡ **极速分析** - 本地执行，数据不上传，保护隐私\n- 🎯 **多维度洞察** - 从时间、语言、贡献者等多角度分析\n\n### ✨ 核心特性\n\n| 特性 | 描述 | 状态 |\n|------|------|------|\n| 📈 **提交统计** | 总提交数、代码行数变化、文件变更数 | ✅ |\n| ⏰ **时间分析** | 活跃时段热力图、最佳编码时间识别 | ✅ |\n| 💻 **语言统计** | 编程语言使用分布、文件类型分析 | ✅ |\n| 👥 **贡献者分析** | 团队成员贡献度排行、协作模式 | ✅ |\n| 📊 **可视化报告** | 终端条形图、热力图、摘要面板 | ✅ |\n| 🔄 **JSON 导出** | 支持结构化数据导出供进一步分析 | ✅ |\n\n### 🚀 快速开始\n\n#### 环境要求\n\n- **Python**: 3.8 或更高版本\n- **Git**: 已安装并配置\n- **操作系统**: Linux / macOS / Windows\n\n#### 安装步骤\n\n**方式一：直接运行（推荐）**\n\n```bash\n# 克隆仓库\ngit clone https://github.com/yourusername/devmetrics-cli.git\ncd devmetrics-cli\n\n# 直接运行\npython devmetrics.py\n```\n\n**方式二：安装为系统命令**\n\n```bash\n# 安装\npip install -e .\n\n# 使用全局命令\ndevmetrics\n# 或简写\ndm\n```\n\n#### 本地启动\n\n```bash\n# 分析当前目录的 Git 仓库\npython devmetrics.py\n\n# 分析指定仓库\npython devmetrics.py /path/to/your/repo\n\n# 分析最近 30 天\npython devmetrics.py --since \"30 days ago\"\n\n# 分析特定作者的贡献\npython devmetrics.py --author \"Your Name\"\n\n# 导出 JSON 格式\npython devmetrics.py --json\n```\n\n### 📖 详细使用指南\n\n#### 命令行参数\n\n```\nusage: devmetrics.py [-h] [--since SINCE] [--until UNTIL] [--author AUTHOR]\n                     [--json] [--limit LIMIT] [--version]\n                     [path]\n\nDevMetrics-CLI: 开发者代码度量与生产力分析引擎\n\npositional arguments:\n  path              仓库路径 (默认: 当前目录)\n\noptional arguments:\n  -h, --help        显示帮助信息\n  --since SINCE     开始日期 (如: \"30 days ago\", \"2024-01-01\")\n  --until UNTIL     结束日期\n  --author AUTHOR   指定作者\n  --json            输出 JSON 格式\n  --limit LIMIT     最大提交数 (默认: 1000)\n  --version         显示版本信息\n```\n\n#### 典型使用场景\n\n**场景 1：个人编码习惯分析**\n```bash\n# 查看自己的编码时间分布\npython devmetrics.py --author \"Your Name\" --since \"90 days ago\"\n```\n\n**场景 2：团队贡献统计**\n```bash\n# 导出 JSON 供团队报告使用\npython devmetrics.py --json \u003e team_metrics.json\n```\n\n**场景 3：项目健康度检查**\n```bash\n# 分析整个项目的活跃度\npython devmetrics.py --since \"1 year ago\" --limit 5000\n```\n\n### 💡 设计思路与迭代规划\n\n#### 技术选型原因\n\n- **纯标准库实现**：确保零依赖，任何 Python 环境均可直接运行\n- **Git 命令解析**：直接调用 Git CLI，兼容所有 Git 版本\n- **终端可视化**：使用 ANSI 转义码实现跨平台彩色输出\n\n#### 后续功能迭代计划\n\n- [ ] 趋势分析（周/月对比）\n- [ ] 代码复杂度估算\n- [ ] 提交信息质量分析\n- [ ] HTML 报告导出\n- [ ] 配置文件支持\n- [ ] 多仓库聚合分析\n\n#### 社区贡献方向\n\n欢迎提交 Issue 和 PR！特别需要：\n- 更多编程语言识别支持\n- 可视化图表优化\n- 性能优化建议\n\n### 📦 打包与部署指南\n\n#### 构建分发包\n\n```bash\n# 清理并构建\nmake clean\nmake build\n\n# 分发包将生成在 dist/ 目录\ndist/\n  ├── devmetrics-cli-1.0.0.tar.gz\n  └── devmetrics_cli-1.0.0-py3-none-any.whl\n```\n\n#### 安装使用\n\n```bash\n# 从 wheel 安装\npip install dist/devmetrics_cli-1.0.0-py3-none-any.whl\n\n# 验证安装\ndevmetrics --version\n```\n\n### 🤝 贡献指南\n\n1. Fork 本仓库\n2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 创建 Pull Request\n\n### 📄 开源协议\n\n本项目采用 [MIT](LICENSE) 协议开源。\n\n---\n\n\u003ca name=\"繁體中文\"\u003e\u003c/a\u003e\n## 🇹🇼 繁體中文\n\n### 🎉 專案介紹\n\n**DevMetrics-CLI** 是一款專為開發者打造的輕量級程式碼度量與生產力分析工具。它透過分析 Git 提交歷史，幫助開發者深入了解自己的編碼習慣、時間分布、語言偏好和貢獻模式。\n\n**靈感來源**：在 AI 輔助程式設計時代，開發者需要更好地了解自己的編碼行為模式，以便最佳化工作效率和提升程式碼品質。\n\n**自研差異化亮點**：\n- 🚀 **零依賴設計** - 僅使用 Python 標準庫，無需安裝任何第三方套件\n- 📊 **終端視覺化** - 精美的命令列圖表和熱力圖展示\n- ⚡ **極速分析** - 本地執行，資料不上傳，保護隱私\n- 🎯 **多維度洞察** - 從時間、語言、貢獻者等多角度分析\n\n### ✨ 核心特性\n\n| 特性 | 描述 | 狀態 |\n|------|------|------|\n| 📈 **提交統計** | 總提交數、程式碼行數變化、檔案變更數 | ✅ |\n| ⏰ **時間分析** | 活躍時段熱力圖、最佳編碼時間識別 | ✅ |\n| 💻 **語言統計** | 程式語言使用分布、檔案類型分析 | ✅ |\n| 👥 **貢獻者分析** | 團隊成員貢獻度排行、協作模式 | ✅ |\n| 📊 **視覺化報告** | 終端條形圖、熱力圖、摘要面板 | ✅ |\n| 🔄 **JSON 匯出** | 支援結構化資料匯出供進一步分析 | ✅ |\n\n### 🚀 快速開始\n\n#### 環境要求\n\n- **Python**: 3.8 或更高版本\n- **Git**: 已安裝並配置\n- **作業系統**: Linux / macOS / Windows\n\n#### 安裝步驟\n\n**方式一：直接執行（推薦）**\n\n```bash\n# 克隆倉庫\ngit clone https://github.com/yourusername/devmetrics-cli.git\ncd devmetrics-cli\n\n# 直接執行\npython devmetrics.py\n```\n\n**方式二：安裝為系統命令**\n\n```bash\n# 安裝\npip install -e .\n\n# 使用全域命令\ndevmetrics\n# 或簡寫\ndm\n```\n\n#### 本地啟動\n\n```bash\n# 分析目前目錄的 Git 倉庫\npython devmetrics.py\n\n# 分析指定倉庫\npython devmetrics.py /path/to/your/repo\n\n# 分析最近 30 天\npython devmetrics.py --since \"30 days ago\"\n\n# 分析特定作者的貢獻\npython devmetrics.py --author \"Your Name\"\n\n# 匯出 JSON 格式\npython devmetrics.py --json\n```\n\n### 📖 詳細使用指南\n\n#### 命令列參數\n\n```\nusage: devmetrics.py [-h] [--since SINCE] [--until UNTIL] [--author AUTHOR]\n                     [--json] [--limit LIMIT] [--version]\n                     [path]\n\nDevMetrics-CLI: 開發者程式碼度量與生產力分析引擎\n\npositional arguments:\n  path              倉庫路徑 (預設: 目前目錄)\n\noptional arguments:\n  -h, --help        顯示說明資訊\n  --since SINCE     開始日期 (如: \"30 days ago\", \"2024-01-01\")\n  --until UNTIL     結束日期\n  --author AUTHOR   指定作者\n  --json            輸出 JSON 格式\n  --limit LIMIT     最大提交數 (預設: 1000)\n  --version         顯示版本資訊\n```\n\n### 💡 設計思路與迭代規劃\n\n#### 技術選型原因\n\n- **純標準庫實現**：確保零依賴，任何 Python 環境均可直接執行\n- **Git 命令解析**：直接呼叫 Git CLI，相容所有 Git 版本\n- **終端視覺化**：使用 ANSI 轉義碼實現跨平台彩色輸出\n\n#### 後續功能迭代計劃\n\n- [ ] 趨勢分析（週/月對比）\n- [ ] 程式碼複雜度估算\n- [ ] 提交資訊品質分析\n- [ ] HTML 報告匯出\n- [ ] 設定檔支援\n- [ ] 多倉庫聚合分析\n\n### 📦 打包與部署指南\n\n```bash\n# 清理並構建\nmake clean\nmake build\n\n# 分發包將生成在 dist/ 目錄\npip install dist/devmetrics_cli-1.0.0-py3-none-any.whl\n```\n\n### 🤝 貢獻指南\n\n1. Fork 本倉庫\n2. 建立特性分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 建立 Pull Request\n\n### 📄 開源協議\n\n本專案採用 [MIT](LICENSE) 協議開源。\n\n---\n\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n## 🇺🇸 English\n\n### 🎉 Introduction\n\n**DevMetrics-CLI** is a lightweight code metrics and productivity analysis tool designed for developers. It analyzes Git commit history to help developers gain insights into their coding habits, time distribution, language preferences, and contribution patterns.\n\n**Inspiration**: In the era of AI-assisted programming, developers need to better understand their coding behavior patterns to optimize work efficiency and improve code quality.\n\n**Key Differentiators**:\n- 🚀 **Zero Dependencies** - Uses only Python standard library, no third-party packages required\n- 📊 **Terminal Visualization** - Beautiful command-line charts and heatmaps\n- ⚡ **Lightning Fast** - Local execution, no data upload, privacy protected\n- 🎯 **Multi-dimensional Insights** - Analysis from time, language, contributor perspectives\n\n### ✨ Core Features\n\n| Feature | Description | Status |\n|---------|-------------|--------|\n| 📈 **Commit Statistics** | Total commits, line changes, files modified | ✅ |\n| ⏰ **Time Analysis** | Activity heatmaps, peak coding time identification | ✅ |\n| 💻 **Language Stats** | Programming language distribution, file type analysis | ✅ |\n| 👥 **Contributor Analysis** | Team member contribution ranking, collaboration patterns | ✅ |\n| 📊 **Visual Reports** | Terminal bar charts, heatmaps, summary panels | ✅ |\n| 🔄 **JSON Export** | Structured data export for further analysis | ✅ |\n\n### 🚀 Quick Start\n\n#### Requirements\n\n- **Python**: 3.8 or higher\n- **Git**: Installed and configured\n- **OS**: Linux / macOS / Windows\n\n#### Installation\n\n**Option 1: Direct Run (Recommended)**\n\n```bash\n# Clone repository\ngit clone https://github.com/yourusername/devmetrics-cli.git\ncd devmetrics-cli\n\n# Run directly\npython devmetrics.py\n```\n\n**Option 2: Install as System Command**\n\n```bash\n# Install\npip install -e .\n\n# Use global command\ndevmetrics\n# or shorthand\ndm\n```\n\n#### Usage\n\n```bash\n# Analyze current directory Git repository\npython devmetrics.py\n\n# Analyze specific repository\npython devmetrics.py /path/to/your/repo\n\n# Analyze last 30 days\npython devmetrics.py --since \"30 days ago\"\n\n# Analyze specific author contributions\npython devmetrics.py --author \"Your Name\"\n\n# Export JSON format\npython devmetrics.py --json\n```\n\n### 📖 Detailed Usage\n\n#### Command Line Arguments\n\n```\nusage: devmetrics.py [-h] [--since SINCE] [--until UNTIL] [--author AUTHOR]\n                     [--json] [--limit LIMIT] [--version]\n                     [path]\n\nDevMetrics-CLI: Developer Code Metrics \u0026 Productivity Analysis Engine\n\npositional arguments:\n  path              Repository path (default: current directory)\n\noptional arguments:\n  -h, --help        Show help message\n  --since SINCE     Start date (e.g., \"30 days ago\", \"2024-01-01\")\n  --until UNTIL     End date\n  --author AUTHOR   Specific author\n  --json            Output JSON format\n  --limit LIMIT     Maximum commits (default: 1000)\n  --version         Show version\n```\n\n### 💡 Design \u0026 Roadmap\n\n#### Technical Choices\n\n- **Pure Standard Library**: Ensures zero dependencies, runs in any Python environment\n- **Git CLI Parsing**: Direct Git CLI calls, compatible with all Git versions\n- **Terminal Visualization**: ANSI escape codes for cross-platform colored output\n\n#### Future Roadmap\n\n- [ ] Trend analysis (week/month comparison)\n- [ ] Code complexity estimation\n- [ ] Commit message quality analysis\n- [ ] HTML report export\n- [ ] Configuration file support\n- [ ] Multi-repository aggregation\n\n### 📦 Packaging \u0026 Deployment\n\n```bash\n# Clean and build\nmake clean\nmake build\n\n# Distribution packages in dist/ directory\npip install dist/devmetrics_cli-1.0.0-py3-none-any.whl\n```\n\n### 🤝 Contributing\n\n1. Fork the repository\n2. Create feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to branch (`git push origin feature/AmazingFeature`)\n5. Create Pull Request\n\n### 📄 License\n\nThis project is open source under the [MIT](LICENSE) License.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by DevMetrics Team**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fdevmetrics-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fdevmetrics-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fdevmetrics-cli/lists"}