Skip to main content

A compact terminal heatmap showing one year of Git commits (like GitHub contributions, but with compact bars instead of squares, to fit into a smaller terminal window)

Project description

git-year

A compact terminal heatmap showing one year of Git commits — similar to GitHub’s contribution graph, but optimized for small terminal windows using minimal vertical bars instead of squares.

Perfect for developers who want a clean, unobtrusive activity overview directly inside the terminal.


Features

  • Shows the past year of commit activity (today back to the same date last year) for the current Git repo
  • Jump to any calendar year with --year 2024 (auto-stops at today if the year is still in progress)
  • Choose Monday or Sunday as the calendar week start (default: Monday) and keep the preference across reboots
  • Green intensity gradient based on commit volume
  • Compact vertical bars (|) instead of large squares — fits even tiny terminals
  • Zero dependencies (pure Python + Git)
  • 256-color ANSI output with dark-mode-friendly palette
  • Highlights the current weekday
  • Works in macOS, Linux, Windows Terminal, VS Code terminal, Git Bash
  • Graceful message if run outside a Git repo
  • Ready for PyPI (pip install git-year)

Installation

bash
pip install git-year

Usage

Simply run from inside a Git repository:

git-year

You’ll see a compact 7×52 bar heatmap covering the past year up to today:

M ||||||||||||||||||||||||||||||
T ||||||||||||||||||||||||||||||
W ||||||||||||||||||||||||||||||
T ||||||||||||||||||||||||||||||
F ||||||||||||||||||||||||||||||
S ||||||||||||||||||||||||||||||
S ||||||||||||||||||||||||||||||
  • Rows = weekdays (Mon–Sun)
  • Columns = weeks (52 total) covering the trailing year’s timeline (same date last year → today)
  • Color intensity = commit count
  • The current day label is highlighted in yellow

Show the installed version:

git-year --version

Need a refresher on the available options?

git-year --help

Focus on a specific calendar year (Jan 1 → Dec 31, or today if it’s still the current year):

git-year --year 2024

Choose the start of the week (case-insensitive, saved to ~/.config/git-year/config.toml on Linux/macOS or %APPDATA%\git-year\config.toml on Windows):

git-year --week-start sunday
git-year --week-start Mon

When you try to peek into a future year you’ll get a playful reminder:

Trying to look into the future? ;)

Requirements

  • Python 3.8+
  • Git available in PATH
  • A terminal with ANSI color support (all modern terminals)
  • On legacy cmd.exe ANSI colors may fall back to monochrome

Contributing

Contributions are welcome! Ideas, issues, and pull requests are appreciated.


License

MIT License Copyright (c) 2025 Serge Velbovets


Enjoy your terminal-native Git activity graph without leaving the shell — git-year keeps your development rhythm visible, simple, and elegant.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_year-0.5.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_year-0.5.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file git_year-0.5.0.tar.gz.

File metadata

  • Download URL: git_year-0.5.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_year-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e0f67d42a160ae2ce853d1d60b8dbf5138b6888d6a7618cf0c13e4dd1d11ae7d
MD5 0087cb8effd948d5b051b6829d9f16e9
BLAKE2b-256 e814f1468982ae4c7d83c2fefa8dea29c482ddce9033cc88aaf172ed7343f166

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_year-0.5.0.tar.gz:

Publisher: publish-pypi.yml on velbix/git-year

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file git_year-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: git_year-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for git_year-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93fc8b5e2e11d39864d640b57aa7e02e985a66ab725316a057851487123cf7cd
MD5 87f08091d9ec82058ec34dc944afcf8a
BLAKE2b-256 e7f067d138717bec61e0bebd1f1822012d7c448e5f8aa0ee29acf1a6dad27f13

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_year-0.5.0-py3-none-any.whl:

Publisher: publish-pypi.yml on velbix/git-year

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page