A small, fast CLI tool (written in Go) to analyze a Git repository and produce "streak" reports based on commit activity. Use it to see your current and longest commit streaks, per-author streaks, and to export daily activity into CSV/JSON for dashboards or personal metrics.
- Language: Go
- Repository: GoluScriptMage/git-streak-log
- Scan a local Git repository for commit activity.
- Compute current streak, longest streak, and streak history.
- Filter by author, branch, and date range.
- Output as human-readable text, JSON, or CSV.
- Lightweight and fast — designed to run locally or in CI.
Install the latest release with Go:
# Go 1.18+
go install github.com/GoluScriptMage/git-streak-log@latestOr build from source:
git clone https://github.com/GoluScriptMage/git-streak-log.git
cd git-streak-log
go build ./...
# or build the CLI binary (adjust path if the main package lives elsewhere)
go build -o git-streak-log ./cmd/git-streak-logBasic usage (scan the current repo):
# run against the current working directory repository
git-streak-log .Common flags (examples — exact flags may vary depending on the CLI implementation):
--since: start date (YYYY-MM-DD)--until: end date (YYYY-MM-DD)--author: filter by author name or email--branch: filter by branch name--format: output format:text(default),json, orcsv--output: write output to file (path)--week-start: set week start day (e.g.,monday)--timezone: timezone for date grouping (e.g.,UTC,America/Los_Angeles)
Example: compute streaks for the last year and export to JSON:
git-streak-log . --since 2025-07-01 --format json --output streaks-2025.jsonExample: filter to a specific author and branch and get CSV:
git-streak-log /path/to/repo --author "Jane Doe" --branch main --format csv --output jane-main.csvRepository: /path/to/repo
Range: 2025-07-01 → 2026-07-27
Author: all
Branch: all
Current streak: 12 days (since 2026-07-16)
Longest streak: 53 days (2025-11-01 → 2025-12-23)
Streaks by day:
2026-07-27: 2 commits
2026-07-26: 1 commit
...
Example output (JSON):
{
"repo": "/path/to/repo",
"range": { "since": "2025-07-01", "until": "2026-07-27" },
"currentStreak": { "days": 12, "since": "2026-07-16" },
"longestStreak": { "days": 53, "start": "2025-11-01", "end": "2025-12-23" },
"dailyActivity": [
{ "date": "2026-07-27", "commits": 2 },
{ "date": "2026-07-26", "commits": 1 }
]
}Run the tool periodically in CI and store or comment a report:
name: Streak report
on:
schedule:
- cron: '0 8 * * *' # every day at 08:00 UTC
workflow_dispatch:
jobs:
streak:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Install git-streak-log
run: go install github.com/GoluScriptMage/git-streak-log@latest
- name: Run streak report
run: $GOPATH/bin/git-streak-log . --format json --output streak.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: streak-report
path: streak.json- The tool reads commit timestamps from Git history. Timezone and author matching can affect grouping.
- For repository hosting services (GitHub, GitLab), consider running this in CI where the repo is checked out to preserve commit timestamps.
- Large repositories: scanning the entire history can take longer — use
--sinceto limit the range.
Contributions and suggestions are welcome.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/my-feature - Make changes, add tests, and run
go test ./... - Open a pull request describing your change.
Please follow standard Go formatting and tooling (gofmt/golangci-lint as applicable).
This project is provided under the MIT License. See LICENSE for details (or replace with your preferred license).
Thanks to everyone who helps improve this tool. If you use this in your CI or dashboards I'd love to see examples and feedback.