{"id":50477558,"url":"https://github.com/jimyag/commitlens","last_synced_at":"2026-06-01T14:31:22.311Z","repository":{"id":353385394,"uuid":"1219162726","full_name":"jimyag/commitlens","owner":"jimyag","description":"Merged PR and per-contributor stats for GitHub repos: terminal TUI + embedded web UI. Parses Co-authored-by (noreply) for shared credit.","archived":false,"fork":false,"pushed_at":"2026-05-08T04:25:38.000Z","size":15300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T06:27:56.519Z","etag":null,"topics":["github","golang","react"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimyag.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-23T15:38:20.000Z","updated_at":"2026-05-08T04:25:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jimyag/commitlens","commit_stats":null,"previous_names":["jimyag/commitlens"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jimyag/commitlens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Fcommitlens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Fcommitlens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Fcommitlens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Fcommitlens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimyag","download_url":"https://codeload.github.com/jimyag/commitlens/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimyag%2Fcommitlens/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33780085,"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-01T02:00:06.963Z","response_time":115,"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":["github","golang","react"],"created_at":"2026-06-01T14:31:19.871Z","updated_at":"2026-06-01T14:31:22.306Z","avatar_url":"https://github.com/jimyag.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommitLens\n\n一个通用的 Git 贡献分析工具，深度追踪每位贡献者的**提交数**、**新增行数**与**删除行数**。它拥有强大的本地 Git 分析引擎、极速的终端 TUI 界面，以及嵌入在单一二进制文件中的现代化 Web UI。\n\n![TUI 概览](docs/screenshots/tui-contributors.png)\n\n## 核心功能\n\n- **通用 Git 引擎**：同时支持本地文件系统仓库和远程 GitHub 仓库 URL（通过自动 Bare Clone）。分析历史记录无需担心 GitHub API 速率限制。\n- **高级过滤查询**：支持仓库和贡献者的**多选**过滤。可按周、月、季度或年进行下钻分析。\n- **贡献趋势分析**：\n  - **提交量趋势**：直观展示历史活跃度。\n  - **代码行数趋势**：通过堆叠柱状图追踪代码产出与重构力度（新增/删除行）。\n- **交互式 TUI**：由 `bubbletea` 驱动的极速、全键盘操作终端界面。\n- **现代化 Web UI**：基于 React + ECharts 的响应式界面，支持搜索、滚动和高密度数据展示。\n- **多作者识别**：基于 `Co-authored-by` 准确计算所有贡献者的功劳。\n- **单二进制部署**：前端资源编译进二进制文件，一个文件即开即用。\n- **生产级 CI/CD**：集成 GitHub Actions 与 GoReleaser，实现多平台自动构建发布。\n\n## 界面截图\n\n### 终端 TUI\n| 提交趋势 | 提交历史 |\n| :---: | :---: |\n| ![TUI Trend](docs/screenshots/tui-trend.png) | ![TUI Commits](docs/screenshots/tui-commits.png) |\n\n### Web 界面\n| 仪表盘 (提交) | 行数趋势 | 提交历史 |\n| :---: | :---: | :---: |\n| ![Web Commit Trend](docs/screenshots/web-trend-commits.png) | ![Web Lines Trend](docs/screenshots/web-trend-lines.png) | ![Web Commits](docs/screenshots/web-commits.png) |\n\n## 快速开始\n\n### 安装\n从 [Releases](https://github.com/jimyag/commitlens/releases) 下载最新版本的二进制文件。\n\n### 配置\n创建一个 `config.yaml`：\n```yaml\ndiscoveryRoots:\n  - ~/src/github.com/kubernetes  # 自动扫描此目录下所有 git 仓库\nrepositories:\n  - url: https://github.com/kubeovn/kube-ovn.git # 远程仓库\nuserMap:\n  \"Jim Yang\": [\"jimyag\", \"yang.jim@example.com\"] # 将多个别名映射到同一个自然人\n```\n\n### 使用\n```bash\n# 启动终端 TUI\n./commitlens --config config.yaml\n\n# 启动 Web UI (默认端口: 8080)\n./commitlens --web --config config.yaml\n```\n\n## 快捷键 (TUI)\n- `1-5`: 切换标签页 (汇总, 仓库, 提交趋势, 行数趋势, 提交列表)。\n- `[` / `]`: 轮换标签页。\n- `Tab`: 在过滤器与内容区之间切换焦点。\n- `Enter`: 展开过滤器下拉框 / 查看提交详情。\n- `Space`: 在下拉列表中进行多选。\n- `Shift + ←/→`: 左右横移缩放趋势图。\n- `R`: 强制同步/刷新数据。\n- `Q`: 退出。\n\n## 开发\n\n### 依赖\n- Go 1.22+\n- Node.js 20+ \u0026 npm\n\n### 从源码编译\n```bash\nmake build\n```\n\n## 许可证\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimyag%2Fcommitlens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimyag%2Fcommitlens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimyag%2Fcommitlens/lists"}