2026-11-26 17:43:53 +03:00
2026-11-26 17:43:53 +03:00
2026-11-26 17:43:53 +03:00
2026-11-26 17:43:53 +03:00
2026-11-26 17:43:53 +03:00
2026-11-26 17:43:53 +03:00

git-year-wrapped

Generate a shareable year-in-review card from any public git repo's commit history. Works with GitHub, GitLab, Rithub, or any other host that speaks plain git — the tool just clones the repo and reads its real commit log, no host-specific API, no login.

npx git-year-wrapped https://github.com/facebook/react

That's it. One argument, no signup, no API key, no config file. It writes an SVG card you can open in any browser, drop in a README, or convert to PNG with any image tool, and prints the same stats to your terminal.

What it computes

From the real commit log of the repo you point it at:

  • total commits in the window
  • active days and longest daily streak
  • busiest weekday and hour (UTC)
  • top languages touched, by file extension
  • top contributors by commit count

Usage

git-year-wrapped <repo-url> [options]

  --year <YYYY>      Only count commits from this calendar year (UTC).
                      Default: the current year, falling back to all-time
                      history if that year has no commits in this repo.
  --since-days <N>   Only count commits from the last N days instead of a
                      calendar year.
  --all-time         Count the repo's entire history.
  --out <path>       Where to write the SVG card. Default: ./<repo>-wrapped.svg
  --accent <#hex>    Accent color for the card. Default: #4f8cff
  --json             Also print the computed stats as JSON.

Examples:

npx git-year-wrapped https://github.com/facebook/react
npx git-year-wrapped https://rithub.dev/caelum0x/git-year-wrapped --year 2026
npx git-year-wrapped git@gitlab.com:group/project.git --all-time --json

How it works

  1. A git clone --bare --filter=blob:none of the URL you pass in, into a temp directory. The partial-clone filter means file contents are not downloaded, only commit and tree metadata, so even large repos are quick. Hosts that don't support the filter just ignore it; nothing breaks.
  2. git log --name-only over that clone to read every commit's author, date, and changed file paths.
  3. Plain arithmetic over that log — no network calls beyond the clone itself, no AI, nothing sent anywhere.
  4. An SVG card rendered from the result, written to disk.

Requirements

  • Node.js 18+
  • git on your PATH

No other dependencies. Nothing is installed beyond this package itself.

Why this is free

This is published by the team behind Ritgram, a social feed for developers who want their work seen, next to Rithub. It works on any repo on any host, including your competitors' — if it's useful to you, that's the whole point. If you want to post what it finds, Ritgram is one place to put it.

License

MIT

Description
No description provided
Readme 34 KiB
Languages
JavaScript 100%