A Python CLI for git repository analytics: commits, file churn, branches, hotspots
Project description
gitinfo
A Python CLI for git repository analytics. Visualize commit activity, analyze file churn, explore branch history, and discover where you work most—all from the terminal.
Installation
pip install gitinfo
248 commits over 12 month(s)
2024-01 12 ▀▀▀▀▀
2024-02 28 ▀▀▀▀▀▀▀▀▀▀▀▀▀
2024-03 45 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
...
Commands
Commit Activity
| Command | Description |
|---|---|
| (default) | Bar chart of commits by period (day/week/month/year) |
-p day |
Daily granularity |
-p week |
Weekly (ISO week) |
-p month |
Monthly (default) |
-p year |
Yearly |
-f |
Fill missing dates with zero-commit bars |
File Analysis
| Command | Description |
|---|---|
--files |
File type breakdown (% JS, TS, MD, etc.) |
--churn |
File churn ranking (most modified files) |
--hotspots |
Hotspot detection (high churn + many contributors) |
--refactor |
Refactor density (balanced add/del ≈ refactoring) |
--min-churn N |
Minimum churn for hotspots (default: 50) |
Branch Analysis
| Command | Description |
|---|---|
--branches |
Active branches ranked by recency |
--stale |
Stale branches (no commits in N days) |
--stale-days N |
Staleness threshold (default: 30) |
--divergence |
Ahead/behind counts vs main |
--branch-lifetime |
Creation → merge duration for merged branches |
--merges |
Merge frequency timeline (aggregated) |
--merge-timeline |
Timeline of branch merges (date + branch name) |
--compare A B |
Compare two branches statistically |
--main BRANCH |
Main branch for divergence/lifetime/merges (default: main or master) |
Activity Map
| Command | Description |
|---|---|
--work-map |
“Where do I work most?” — directory activity map |
Global Options
Apply to most commands:
| Option | Description |
|---|---|
-a, --after DATE |
After date (e.g. 2024-01-01) |
-b, --before DATE |
Before date |
-u, --author EMAIL |
Filter by author (substring match) |
Examples
Commit bars by week, filtered by author
gitinfo -p week -u "alice@company.com"
File type breakdown for 2024
gitinfo --files -a 2024-01-01 -b 2024-12-31
Most modified files
gitinfo --churn
Hotspots — high churn and many contributors
gitinfo --hotspots --min-churn 100
Refactor vs feature density
gitinfo --refactor
Stale branches (no activity in 60 days)
gitinfo --stale --stale-days 60
Branch divergence from main
gitinfo --divergence
Compare main and feature branch
gitinfo --compare main feature-branch
gitinfo --compare main origin/feature-branch
Where do I work most?
gitinfo --work-map
gitinfo --work-map -u "me@email.com"
Merge timeline
gitinfo --merge-timeline
Output Notes
- Weekend bars are colored blue in commit activity view.
- Churn = lines added + lines deleted per file.
- Refactor density uses “balanced” edits (adds ≈ dels) as a proxy for refactoring.
- Hotspots combine churn and contributor count; files with both rank higher.
- Work map shows directories by edit count and lines changed; hierarchy is indented.
License
MIT
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
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 gitaura-0.1.3.tar.gz.
File metadata
- Download URL: gitaura-0.1.3.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0998d9413b1b20ef2ee9e961b4d15fdbad3e41c25c5ae33ab893d5d0a9e62aa
|
|
| MD5 |
749baa80e981094e6bb2dce6ba8422de
|
|
| BLAKE2b-256 |
b4619356325f9f9ec3e88c584439ca1bacdd687ad3507d74d9b82514ae2e12f6
|
File details
Details for the file gitaura-0.1.3-py3-none-any.whl.
File metadata
- Download URL: gitaura-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dd8357711f6d4ba47cd759bba51ff9dd07acaa17167fde69db74806310f959d
|
|
| MD5 |
9144de23ec6216e63740c4c27d3e1005
|
|
| BLAKE2b-256 |
6e25b5deb52aa30dbe1fb09130a2d82513b9615e78d1399bb95c9f92aef6811e
|