Skip to content

gabrielldn/gh-summary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub forks GitHub issues GitHub PR MIT license

gh-summary

A minimal GitHub CLI extension that gives you a terminal snapshot of your coding activity:
commits, additions, deletions, lines, characters and contribution count.

✨ Why use it?

  • Quick feedback – Instantly see your daily contribution stats without opening GitHub in the browser.
  • Flexible periods – Query a single day, custom date ranges, or last N days.
  • Gamify your coding – Compare activity with friends (responsibly, no commit spamming 😄).
  • Detailed insight – View additions, deletions, total changed lines, characters and repo breakdown.
  • Terminal-friendly – Stay in the terminal while checking your GitHub productivity.

If you like seeing numbers and progress, you're not alone — this tool exists exactly for that reason.


🚀 Features

Capability Description
Day and range summaries Use --author-date, --from/--to or --days
Commit metrics Commits, additions, deletions, total lines, characters
Contribution count Uses GraphQL contribution calendar (optional with --no-contributions)
Repo filtering Restrict to one or more repos with --repo
Breakdown by repository --by-repo and --top-repos for ranked repo stats
Machine-readable output --json output for scripts/automation

All heavy lifting happens locally with Bash + jq; the only requirement is the official GitHub CLI.


📦 Installation

Pre-requisite: GitHub CLI (gh) installed and authenticated via gh auth login.

Install

gh extension install gabrielldn/gh-summary

Update

gh extension upgrade gh-summary

Remove

gh extension remove gh-summary

List installed extensions:

gh extension list

🖥️ Usage

# Help (supports both)
gh summary --help
gh summary help

# Show summary for today
gh summary

# Show summary for another user
gh summary --author torvalds

# Show summary for a specific date
gh summary --author-date 2026-02-21

# Show summary for a date range
gh summary --from 2026-02-01 --to 2026-02-21

# Show last 7 days
gh summary --days 7

# Filter commits by repository (repeatable)
gh summary --days 7 --repo cli/cli --repo cli/go-gh

# Include repository ranking
gh summary --from 2026-02-01 --to 2026-02-21 --by-repo --top-repos 10

# JSON output for scripts
gh summary --days 7 --json

Flags

Flag Description
--author USER GitHub login to inspect (default: authenticated user)
--author-date YYYY-MM-DD Single-day mode (legacy alias for --from/--to)
--from YYYY-MM-DD Start date (inclusive)
--to YYYY-MM-DD End date (inclusive)
--days N Last N days ending today
--repo OWNER/REPO Filter commits by repository (repeatable)
--limit N Maximum commits fetched from search (default: 100)
--json Emit JSON instead of formatted terminal output
--by-repo Show per-repository breakdown
--top-repos N Number of rows in breakdown (0 shows all; default: 5)
--no-contributions Skip GraphQL contribution query

Example output:

╔════════════════════════════════════╗
║Summary for 2026-02-20 to 2026-02-21║
╠────────────────────────────────────╣
║ Author                  gabrielldn ║
║ Period days                      2 ║
║ Commits                          5 ║
║ Additions                     1193 ║
║ Deletions                     1230 ║
║ Total lines                   2423 ║
║ Characters                   48247 ║
║ Repositories                     2 ║
║ Contributions                   16 ║
╚════════════════════════════════════╝

🗺️ Roadmap

  • To be discussed

🤝 Contributing

Anyone is welcome to collaborate!

If you like this project, feel free to ⭐ it and share with friends.


📄 License

Licensed under the MIT License.


🧰 About GitHub CLI

gh is GitHub on the command line. It brings pull requests, issues and other GitHub concepts to your terminal next to where you're already working with git.

GitHub CLI Screenshot

GitHub CLI works on macOS, Windows, and Linux — supporting GitHub.com, Enterprise Cloud, and Server 2.20+.

For full documentation, visit: cli.github.com

About

GitHub CLI extension that summarizes coding activity by day or range, including commits, additions, deletions, total lines, characters, contributions, JSON output, and repo breakdown.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages