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 Sunday or Monday as the calendar week start with
--week-start Monday(default: Sunday) 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
pip install git-year
If pip is not installed – install it before:
python -m ensurepip --upgrade (Windows)
python3 -m ensurepip --upgrade (macOS/Linux)
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:
S ||||||||||||||||||||||||||||||
M ||||||||||||||||||||||||||||||
T ||||||||||||||||||||||||||||||
W ||||||||||||||||||||||||||||||
T ||||||||||||||||||||||||||||||
F ||||||||||||||||||||||||||||||
S ||||||||||||||||||||||||||||||
- Rows = weekdays (Sun-Sat)
- 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 -V
git-year --version
Need a refresher on the available options?
git-year -h
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 (or S, Su, Sun)
git-year --week-start Monday (or M, Mo, 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_year-0.5.5.tar.gz.
File metadata
- Download URL: git_year-0.5.5.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb215d5e7ce0d0f34072341b6e4993c994aeb423d64eb7501273ac38c02a6a9f
|
|
| MD5 |
f0d047b4ab296f03a97439f843ee15ee
|
|
| BLAKE2b-256 |
b98a181f5a5398fc93bd12866ab0ee4e71115958f74fa8f957721e063194d049
|
Provenance
The following attestation bundles were made for git_year-0.5.5.tar.gz:
Publisher:
publish-pypi.yml on velbix/git-year
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_year-0.5.5.tar.gz -
Subject digest:
eb215d5e7ce0d0f34072341b6e4993c994aeb423d64eb7501273ac38c02a6a9f - Sigstore transparency entry: 712263641
- Sigstore integration time:
-
Permalink:
velbix/git-year@ad016cc8aa05cb7bafcc9ccbf017796d33c0247f -
Branch / Tag:
refs/tags/v0.5.5 - Owner: https://github.com/velbix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ad016cc8aa05cb7bafcc9ccbf017796d33c0247f -
Trigger Event:
push
-
Statement type:
File details
Details for the file git_year-0.5.5-py3-none-any.whl.
File metadata
- Download URL: git_year-0.5.5-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6f4a63a67644962b67a550d6a0c8d25cf0761b6c77ec08205bb7df98dc9c71
|
|
| MD5 |
45171b3426601f1e644e504c50ed4845
|
|
| BLAKE2b-256 |
55c002c9fba186d1f1f1eed5b27ed3a661a9efd2c3d0b3bfc60b99ec6ebcf27b
|
Provenance
The following attestation bundles were made for git_year-0.5.5-py3-none-any.whl:
Publisher:
publish-pypi.yml on velbix/git-year
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_year-0.5.5-py3-none-any.whl -
Subject digest:
2a6f4a63a67644962b67a550d6a0c8d25cf0761b6c77ec08205bb7df98dc9c71 - Sigstore transparency entry: 712263645
- Sigstore integration time:
-
Permalink:
velbix/git-year@ad016cc8aa05cb7bafcc9ccbf017796d33c0247f -
Branch / Tag:
refs/tags/v0.5.5 - Owner: https://github.com/velbix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ad016cc8aa05cb7bafcc9ccbf017796d33c0247f -
Trigger Event:
push
-
Statement type: