npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wukong-gitlog-cli

v1.0.45

Published

Advanced Git commit log exporter with Excel/JSON/TXT output, grouping, stats and CLI.

Readme

📦 wukong-gitlog-cli

一个增强型的 Git 提交记录分析与导出工具。支持 Excel / JSON / TXT 输出、分组统计、加班文化分析、Gerrit 链接集成,并带有可视化 Web Dashboard。

中文 | English


✨ 功能特性

  • 多格式导出:支持将 Git 记录导出为 JSON、文本或 Excel (XLSX)。
  • 灵活分组:支持按天或按月进行记录分组。
  • 加班分析:分析每日工作时长、节假日、周末加班情况,并提供累计风险评估。
  • Gerrit 集成:支持自定义 Gerrit URL 模板(支持 {{hash}}{{changeId}}{{changeNumber}})。
  • Web Dashboard:内置本地可视化面板,包含图表和风险摘要。
  • 去重功能:自动根据 Change-Id 对提交记录进行去重。
  • 作者映射:支持 authorAliases 配置,将不同的邮箱/用户名合并为同一人。

📥 安装

推荐全局安装:

npm i -g wukong-gitlog-cli
# 或
yarn global add wukong-gitlog-cli

# 运行
wukong-gitlog-cli --help

🚀 快速开始

# 初始化配置文件
wukong-gitlog-cli init

# 执行分析并启动 Web Dashboard
wukong-gitlog-cli serve 

🛠 命令详解

工具采用了子命令结构,更加模块化:

1. init

初始化配置文件(支持 .wukonggitlogrc YAML、JS 或 JSON 格式)。

wukong-gitlog-cli init [-f, --force]

2. analyze

核心分析命令。获取 Git 日志并执行全面分析。

wukong-gitlog-cli analyze [options]

3. overtime

专注于加班文化分析。

wukong-gitlog-cli overtime [options]

4. export

专注于将数据导出为不同格式。

wukong-gitlog-cli export [options]

5. journal

生成工作日报/日志。

wukong-gitlog-cli journal [options]

6. serve

启动本地 Web Dashboard。在启动前会自动执行分析以确保数据最新。

wukong-gitlog-cli serve [--port <n>]

⚙️ 参数选项

全局参数

  • -l, --lang <code>:设置语言(en, zh-CN)。
  • --debug:开启调试模式。
  • --info:显示环境信息(Git 版本、操作系统等)。

Git 相关参数(适用于 analyze, overtime, export, journal

  • --author <name>:按作者名过滤。
  • --email <email>:按邮箱过滤。
  • --since <date>:起始日期(如 2025-01-01)。
  • --until <date>:结束日期。
  • --limit <n>:限制提交数量。
  • --no-merges:排除 Merge 提交。
  • --path <path>:Git 仓库路径。

分析相关参数

  • --work-start <hour>:标准上班时间(默认:9)。
  • --work-end <hour>:标准下班时间(默认:18)。
  • --overnight-cutoff <hour>:跨天计算截止时间(默认:6)。
  • --country <code>:节假日日历(CN, US 等)。

输出相关参数

  • -f, --format <type>:输出格式(text, excel, json)。
  • --out <file>:输出文件名。
  • --out-dir <dir>:输出目录。
  • --stats:在 Excel 中包含统计工作表。

📊 Web Dashboard

启动服务以查看交互式图表:

wukong-gitlog-cli serve

访问 http://localhost:3000 查看:

  • 按天/月的提交分布。
  • 加班趋势和高峰时段。
  • 最近 30 天加班时长风险:自动计算过去 30 天的累计加班时长,并标注风险等级(轻度、中度、严重)。

🔗 Gerrit 支持

在 Gerrit URL 中使用模板:

wukong-gitlog-cli analyze --gerrit "https://gerrit.example.com/c/project/+/{{hash}}"

若需使用数字形式的 changeNumber,请提供 Gerrit API 地址:

wukong-gitlog-cli analyze --gerrit "https://gerrit.example.com/c/project/+/{{changeNumber}}" --gerrit-api https://gerrit.example.com/gerrit

🧾 作者映射 (authorAliases)

在配置文件中合并多个身份:

authorAliases:
  "[email protected]": "汤姆"
  "[email protected]": "汤姆"
  "Tom Jacky": "汤姆"

📄 开源协议

MIT