Self-contained HTML commit-analytics dashboard generated from `git log`.
Project description
repostory
Self-contained HTML commit-analytics dashboard generated from git log.
Point repostory at any local git repository and it produces a single HTML file containing an interactive dashboard: commit cadence, author breakdowns, conventional-commit usage, rework signals, co-change coupling, and more. No server, no external assets — just open the file.
Install
Requires Python 3.9+ and a working git on PATH.
From source (recommended while unreleased)
# 1. Clone the repository
git clone https://github.com/<your-user>/repostory.git
cd repostory
# 2. (Optional but recommended) create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS / Linux
# .\.venv\Scripts\activate # Windows PowerShell
# 3. Upgrade pip, then install the package
python -m pip install --upgrade pip
pip install .
# 4. Verify
repostory --version
From PyPI
Once the first release lands on PyPI:
pip install repostory
For development
git clone https://github.com/<your-user>/repostory.git
cd repostory
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
-e installs in editable mode so source changes take effect without reinstalling. [dev] pulls in pytest.
Usage
repostory # analyse the current directory
repostory --repo /path/to/repo # point at another repo
repostory --output report.html # custom output path
repostory --author you@example.com # filter by author email substring
repostory --fetch # `git fetch --all --prune` first
repostory --fast # skip --numstat (faster, less detail)
Or run as a module:
python -m repostory --repo /path/to/repo
Options
| Flag | Default | Description |
|---|---|---|
--repo |
. |
Path to the git repository. |
--output |
repostory.html |
Output HTML file path. |
--author |
all | Filter commits by author email substring. |
--fetch |
off | Run git fetch --all --prune before reading history. |
--fast |
off | Skip file-level analysis (no bus factor, hotspots, coupling). |
-v, --verbose |
off | Verbose (DEBUG) logging. |
-q, --quiet |
off | Only show warnings and errors. |
--version |
— | Print version and exit. |
What you get
- Cadence — commits per day, week, and rolling averages.
- Author breakdown — per-author activity, bus factor, contribution share.
- Commit types — conventional-commit type distribution (
feat,fix,refactor, …). - Rework signal — share of commits matching rework keywords (
fix,revert,hotfix, …). - Hotspots — most-touched files and file-size buckets.
- Co-change coupling — files that change together.
- Velocity — recent vs. prior 4-week window classification (up / steady / down).
- Night & weekend share — when work actually happens.
Project layout
.
├── pyproject.toml
├── README.md
├── src/
│ └── repostory/
│ ├── __init__.py
│ ├── __main__.py # python -m repostory entrypoint
│ ├── cli.py # argparse, logging, orchestration
│ ├── git_io.py # subprocess wrappers around `git log`, `git tag`, …
│ ├── cadence.py # rolling averages, conventional-commit parsing
│ ├── aggregator.py # raw commits → structured dashboard payload
│ ├── report.py # template rendering
│ ├── constants.py # shared constants
│ └── templates/ # dashboard.html, dashboard.js, styles.css
└── tests/
Layered: transport (cli) → business logic (aggregator, cadence) → data access (git_io) → rendering (report + templates). Uses the src layout so tests can only import the installed package, not a stray in-tree copy.
Development
pip install -e ".[dev]"
pytest
Releases
Releases are fully automated. You do not bump versions, write changelogs, or push tags by hand. The workflow is driven by conventional commits:
| Commit type | What it does |
|---|---|
feat: … |
bumps the minor version |
fix: … / perf: … |
bumps the patch version |
feat!: … (or BREAKING CHANGE: in the body) |
bumps the major version |
chore: / docs: / test: / ci: / style: |
no release |
The pipeline
On every push to main (typically a squash-merged PR), .github/workflows/release.yml runs:
- Runs
pytest. python-semantic-releaseinspects commits since the last tag and decides the next version (or skips if nothing releasable).- Updates
pyproject.tomlandCHANGELOG.md, commits aschore(release): vX.Y.Z [skip ci], tagsvX.Y.Z, and publishes a GitHub Release. - Builds
sdist+wheel, validates withtwine check, and uploads to PyPI via trusted publishing (OIDC — no API tokens stored).
One-time setup
- PyPI account — register at https://pypi.org/account/register/ and enable 2FA.
- Trusted publisher — at https://pypi.org/manage/account/publishing/ add a pending publisher:
- Project:
repostory· Owner: your GitHub user/org · Repo: this repo · Workflow:release.yml· Environment:pypi
- Project:
- GitHub environment — repo Settings → Environments → New environment named
pypi. Add yourself as a required reviewer if you want a manual click before each PyPI push. - Branch protection — if
mainrequires PR reviews or status checks, allow thegithub-actions[bot]user to bypass them, or the release commit will be rejected.
Cutting a release
Just merge a PR with a feat: or fix: commit. That's it. To verify before pushing:
# Preview what the next version would be, without changing anything
pip install python-semantic-release
semantic-release --noop version --print
License
MIT.
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 repostory-0.0.0.tar.gz.
File metadata
- Download URL: repostory-0.0.0.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4cc434401dbd6e55c4883ad8ab59c430073f4ea5f6ab3f35ac1bd478d8b408
|
|
| MD5 |
c83b8c1ffd6787b672ae06fcbf04d60d
|
|
| BLAKE2b-256 |
d9f752d3eceeb7fdc2da40d4a1e6f52cc6b3d6c4a04f8a15dfeb4628a8dcc55a
|
Provenance
The following attestation bundles were made for repostory-0.0.0.tar.gz:
Publisher:
release.yml on lakshaykamat/repostory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repostory-0.0.0.tar.gz -
Subject digest:
4b4cc434401dbd6e55c4883ad8ab59c430073f4ea5f6ab3f35ac1bd478d8b408 - Sigstore transparency entry: 1629596029
- Sigstore integration time:
-
Permalink:
lakshaykamat/repostory@8ad5626a6f567c2b16f472e54229595c3aba1582 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lakshaykamat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ad5626a6f567c2b16f472e54229595c3aba1582 -
Trigger Event:
push
-
Statement type:
File details
Details for the file repostory-0.0.0-py3-none-any.whl.
File metadata
- Download URL: repostory-0.0.0-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18621a0425539d8d3723554bb89aac198b205950a610280fa558cfbdddd3afd8
|
|
| MD5 |
1c4047b8657f7582da7b845864dd8cf1
|
|
| BLAKE2b-256 |
02964e7fdbe666b78c3657520baa6c7209c2211d090d52f71575ed3422a79738
|
Provenance
The following attestation bundles were made for repostory-0.0.0-py3-none-any.whl:
Publisher:
release.yml on lakshaykamat/repostory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repostory-0.0.0-py3-none-any.whl -
Subject digest:
18621a0425539d8d3723554bb89aac198b205950a610280fa558cfbdddd3afd8 - Sigstore transparency entry: 1629596048
- Sigstore integration time:
-
Permalink:
lakshaykamat/repostory@8ad5626a6f567c2b16f472e54229595c3aba1582 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lakshaykamat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ad5626a6f567c2b16f472e54229595c3aba1582 -
Trigger Event:
push
-
Statement type: