I built Spotify Wrapped for Git using GitHub Copilot CLI

Published: (February 15, 2026 at 01:37 AM EST)
6 min read
Source: Dev.to

Source: Dev.to

What I Built

git-wrapped — Spotify Wrapped, but for your Git history.

Every December, Spotify tells you what kind of listener you are. I wanted the same thing for coding. What if your terminal could tell you that you’re a Night Owl who codes at 2 AM, or a Code Surgeon who deletes more than they write?

git-wrapped is a Python CLI tool that analyzes any Git repository and generates a beautiful, colorful terminal report. No browser, no dashboard, no account — just run a command and see your year in code.

The Full Feature Set

  • The Numbers — Total commits, files changed, lines added/deleted, net line impact, active days
  • Activity Heatmap — A GitHub‑style contribution calendar rendered entirely in your terminal using Unicode block characters
  • When You Code — Hour‑of‑day and day‑of‑week bar charts showing your coding rhythm
  • Top Files — Leaderboard of your most frequently modified files
  • Languages — Programming language breakdown with percentage bars
  • Streaks & Records — Longest streak, current streak, busiest single day, best month
  • Coder DNA — A personality assessment based on your commit patterns: Night Owl, Early Bird, Weekend Warrior, Streak Master, Feature Machine, Code Surgeon, or Balanced Builder
  • Fun Facts — Holiday commits, longest/shortest commit messages, contributor count, productivity stats
  • Compare Mode — Year‑over‑year comparison (--compare 2024 2025) with delta percentages and personality‑shift tracking
  • Share Card — A copy‑pasteable plain‑text card for sharing on social media (--share)
  • JSON Export — Dump raw stats as JSON for further analysis or integrations

Why I Built This

I spend a lot of time in the terminal. I wanted something that celebrates the work developers do — not just the PRs that get merged, but the late‑night debugging sessions, the weekend side projects, the 14‑day commit streaks that nobody notices.

git-wrapped makes that visible. And it’s fun.

Demo

GitHub repo:

Demo

Try It Yourself

# Install from PyPI
pip install git-wrapped

# Or install from source
git clone https://github.com/stackmasteraliza/git-wrapped.git
cd git-wrapped
pip install -e .

# Run on any repo
git-wrapped

# Analyze a specific year
git-wrapped --year 2025

# Compare two years
git-wrapped --compare 2024 2025

# Generate a share card
git-wrapped --share

Tech Stack

  • Python 3.8+ — Core language
  • Rich — Terminal formatting (panels, tables, progress bars, styled text)
  • Git log parsing — Custom parser using --numstat and --format for file‑level stats
  • Zero external API calls — Everything runs locally; your data never leaves your machine

One external dependency. That’s it.

My Experience with GitHub Copilot CLI

GitHub Copilot CLI was my pair programmer for this entire project. Instead of tab‑switching between Stack Overflow, Git docs, and Rich documentation, I stayed in my terminal and asked Copilot directly.

1. Understanding git log format

The first challenge was figuring out how to extract structured data from git log. I asked Copilot CLI to explain the --format flags, and it gave me a clear breakdown of every placeholder — %H for hash, %an for author name, %aI for ISO date, %s for subject line — plus how --numstat adds per‑file insertion/deletion stats and how >>> delimiters can separate commits for reliable parsing.

Copilot CLI — git log format

2. Calculating commit streaks

Computing the longest daily commit streak was trickier than expected. I needed to handle gaps, deduplicate dates, and track both the longest historical streak and the current active one.

I asked Copilot CLI for approaches and it gave me multiple solutions — a Python version using datetime.timedelta to detect consecutive days, and even a Bash one‑liner. I adapted the Python approach directly into my analyzer:

# Copilot helped me arrive at this pattern
sorted_dates = sorted(set(commit_dates))
streak, max_streak = 1, 1
for i in range(1, len(sorted_dates)):
    if (sorted_dates[i] - sorted_dates[i-1]).days == 1:
        streak += 1
        max_streak = max(max_streak, streak)
    else:
        streak = 1

Copilot CLI — streak calculation

3. Grouping commits by hour of day

For the “When You Code” charts, I needed to bucket commits into 24 hourly bins. Copilot suggested using datetime to extract the hour from each commit timestamp and then collections.Counter to tally them. The resulting data fed directly into Rich’s bar‑chart rendering.

4. Rendering the terminal heatmap

This was the hardest visual to get right – a GitHub‑style contribution heatmap, but in the terminal, using colored Unicode blocks.

I asked Copilot CLI how to render a colored heatmap using Python’s Rich library, and it showed me two approaches:

  • Table‑based approach – using Rich’s Table with colored cells.
  • Block‑character approach – mapping values to characters with ANSI colors.

I ended up combining both – using Rich’s Console for colour management and block characters for the grid cells:

colors = ["bright_black", "dark_green", "green", "bright_green"]
char   = "█"

for week in range(weeks):
    for day in range(7):
        intensity = get_intensity(data[week][day])
        output += f"[{colors[intensity]}]{char}[/]"

Copilot CLI — heatmap rendering

The Impact

Without Copilot CLI, each of these problems would have meant:

  1. Opening a browser.
  2. Scanning documentation.
  3. Finding a relevant example.
  4. Adapting it.
  5. Testing.

That cycle breaks flow.

With Copilot CLI the cycle was:

  1. Ask a question
  2. Get a working answer
  3. Adapt and move on.

I stayed in my terminal the entire time. The cognitive load dropped and I could focus on making the output feel delightful instead of fighting implementation details. It felt less like using a tool and more like pair‑programming with someone who has every man page memorised.

Challenges & Discoveries

The heatmap was the hardest part.
Terminals don’t have pixels – you’re working with a character grid where each “cell” is a text character. Getting the heatmap to look like GitHub’s contribution graph required careful math: mapping 52 weeks × 7 days into a grid, choosing the right Unicode block characters, and picking green shades that look good across different terminal themes.

Personality detection was surprisingly fun.
The “Coder DNA” feature assigns you a personality based on your commit patterns. Calibrating the thresholds (e.g., “30 % of commits after 10 PM = Night Owl”) required running it against a bunch of real repos to make sure the labels felt accurate and fun, not arbitrary.

Rich is incredible.
Python’s Rich library does the heavy lifting for all the terminal visuals – panels, tables, progress bars, coloured text. It’s the reason git‑wrapped looks polished without needing a web UI.

What Makes This Special

For developers

  • See your coding habits visualised in seconds.
  • Discover patterns you didn’t know you had (turns out I code most on Thursdays).
  • A fun conversation starter in team stand‑ups.

For teams

  • Run it on shared repos to see team‑wide patterns.
  • Compare year‑over‑year to track how the team’s rhythm evolves.

For the community

  • Fully open‑source – fork it, extend it, make it yours.
  • Single dependency – easy to install anywhere.
  • Privacy‑first – everything runs locally, no data leaves your machine.

Built with Python, Rich, and a lot of late‑night commits. Powered by GitHub Copilot CLI.

GitHub Repository:

0 views
Back to Blog

Related posts

Read more »

snip - Terminal Snippet Manager

What I Built snip is a CLI snippet manager that lets developers save, search, and safely execute code snippets directly from the terminal—with fuzzy search, a...

🐾GitPet - No more lonely debuging

!Cover image for 🐾GitPet - No more lonely debuginghttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fde...