@mazhu/gitstats
v1.0.0
Published
Git commit history analyzer - generate contribution reports and chart data
Downloads
125
Readme
GitStats
Git commit history analyzer - generate contribution reports and chart data.
Installation
npm install -g @mazhu/gitstatsOr run directly from source:
node src/index.js <command>Commands
gitstats summary
Get commit summary: total count, active days, top contributor.
gitstats summary -r /path/to/repogitstats activity
Contribution heatmap data grouped by day, week, or month.
gitstats activity -r /path/to/repo --by day
gitstats activity --by week
gitstats activity --by monthgitstats authors
Author ranking by number of commits.
gitstats authors -r /path/to/repo -n 10gitstats commits
Commits within a time range.
gitstats commits -r /path/to/repo --since "2024-01-01" --until "2024-12-31"gitstats files
Most frequently modified files.
gitstats files -r /path/to/repo -n 10gitstats export
Export full report as JSON or CSV.
gitstats export -r /path/to/repo --format json -o report.json
gitstats export --format csv -o report.csvExamples
# Analyze current repository
gitstats summary -r .
# Get author rankings
gitstats authors -r . -n 20
# Export full report
gitstats export -r . --format json | jq .Output Format
All commands output JSON by default for easy parsing and integration.
{
"total_commits": 150,
"active_days": 45,
"unique_authors": 3,
"top_contributor": {
"name": "John Doe",
"commits": 100
},
"date_range": {
"first": "2024-01-15",
"last": "2024-06-20"
}
}