Skip to main content

A GitHub-style heatmap of commits for your terminal

Project description

git-ember

A GitHub-style heatmap of commit activity for your terminal.

Overview

git-ember displays a colored grid representing commit activity over time, similar to the contribution graph shown on GitHub profiles. It reads directly from your local Git history—no external APIs or network requests required.

The tool supports multiple color schemes, branch filtering, custom date ranges, and can display repository statistics, recent commits, and branch tree visualizations.

Prerequisites

  • Python 3.11 or higher
  • Git installed and available in PATH

Installation

  1. Clone the repository:

    git clone https://codeberg.org/lukavr05/git-ember.git
    cd git-ember
    
  2. Install the package:

    pip install -e .
    
  3. Verify the installation:

    git-ember --version
    

Running without installation

If you prefer not to install the package, run directly:

PYTHONPATH=src python3 main.py /path/to/repo

Uninstall

pip uninstall git-ember

Configuration

git-ember reads configuration from ~/.config/git-ember/config.toml (or platform-specific config directory). CLI arguments take precedence over config values.

Variable Required Default Description
color No green Color scheme name
border No = Border character
week_start No Sunday Week start day (Sunday/Monday)

Example config file

color = "blue"
border = "-"
week_start = "Monday"

Usage

Show commit heatmap for the current year:

git-ember

Show heatmap for a specific repository:

git-ember /path/to/repo

Show multiple years:

git-ember --years 2
git-ember -y 3

Use different color schemes:

git-ember --color green    # default
git-ember --color blue
git-ember --color orange
git-ember --color purple
git-ember --color mono

Show heatmap for a specific branch:

git-ember --branch feature-x

Display branch tree visualization:

git-ember --tree
git-ember --branch feature-x --tree

Show custom date range:

git-ember --after 2025-01-01 --before 2025-06-30
git-ember --after 2025-01-01

Show extended report with recent commits and top contributors:

git-ember --extended
git-ember -e

Show repository statistics:

git-ember --stats
git-ember -S

Command-line options

Flag Alias Description Default
--color -c Color scheme green
--years -y Number of years to show 1
--border -b Border character =
--extended -e Show recent commits and top contributors false
--stats -S Show repository statistics false
--ascii -a Use ASCII characters instead of Unicode false
--compact - Show last 4 months only false
--branch - Show heatmap for specific branch all branches
--tree -t Show branch tree under heatmap false
--scale - Intensity scaling: auto or adaptive auto
--after - Show commits after date (YYYY-MM-DD) -
--before - Show commits before date (YYYY-MM-DD) -
--version -V Show version -
--help -h Show help -

Project Structure

git-ember/
├── main.py                 # Entry point
├── pyproject.toml         # Package configuration
├── Makefile              # Build targets
├── .python-version       # Python version (3.11)
├── README.md            # This file
├── docs/
│   ├── CHANGELOG.md    # Version history
│   └── PLAN.md        # Feature planning
├── src/
│   └── gitember/
│       ├── __init__.py   # Package version
│       ├── cli.py        # CLI argument parsing and config
│       ├── git.py       # Git command execution and parsing
│       ├── render.py   # Grid and branch tree rendering
│       └── colors.py   # ANSI color scheme definitions
└── tests/
    ├── conftest.py      # Pytest fixtures
    ├── test_config.py # Config tests
    ├── test_git.py    # Git operations tests
    └── test_render.py # Rendering tests

Development

Run the linter:

make lint

Run tests:

pytest

⚠️ Note: Code coverage is not configured.

License

MIT License — see LICENSE for details.

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_ember-1.3.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

git_ember-1.3.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file git_ember-1.3.2.tar.gz.

File metadata

  • Download URL: git_ember-1.3.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for git_ember-1.3.2.tar.gz
Algorithm Hash digest
SHA256 479ce62bad31e7876c92a03c8ac941108b47486839912f7b256abe4abdd8730f
MD5 b4c33950878bd151273cf24e02f6b1c6
BLAKE2b-256 944b654188f4dc348b1df8e03b9ca0bec0827f87dfc307febfef6e69345388b5

See more details on using hashes here.

File details

Details for the file git_ember-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: git_ember-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for git_ember-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f1493c03e90ea15a75af4f1fd78c307b0dd898d9268688a21c6fe34f5db6f2b
MD5 75897bec59263ac22dd724385eab05f6
BLAKE2b-256 81c6ac1fb2c1199f11dcf3126c45d91da0fc82694afc2c326018f84ba4483098

See more details on using hashes here.

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