Skip to content
xhandlrPublic

About

A CLI for mining git repositories: commit history metrics, code quality, and static analysis, in one report.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

repomine

Python License Package manager

A CLI for mining git repositories: commit history metrics, code quality, and static analysis, in one report.

Features

Git mining (via PyDriller)

  • Commit summary: total commits, authors, first/last commit, files touched
  • Hotspots: files modified most often
  • Bus factor: minimum number of authors whose removal would leave over 50% of files with no remaining contributor
  • Commit activity by hour of day
  • Commit classification by type (feat/fix/refactor/chore/...), with keyword support in both English and Spanish

Static analysis

  • Code duplication (jscpd)
  • Circular dependencies (madge)
  • Cyclomatic complexity per function (lizard)

Results are printed to the console and exported as JSON (or CSV) under results/.

Installation

Requires Python 3.13+ and uv.

uv sync

Usage

uv run repomine <local-path-or-git-url>

Options:

  • -o, --output <path> — export path (default: results/<repo-name>.json)
  • -f, --framework <name> — reserved for future per-framework analysis, not yet implemented

Sample output

Running repomine . against this repo's own history:

             Resumen
╭──────────────────┬────────────╮
│ Total commits    │ 23         │
│ Autores          │ 2          │
│ Archivos tocados │ 23         │
╰──────────────────┴────────────╯

 Tipos de commits
╭─────────┬───────╮
│ Tipo    │ Total │
├─────────┼───────┤
│ feat    │    13 │
│ chore   │     6 │
│ fix     │     2 │
│ unknown │     1 │
│ docs    │     1 │
╰─────────┴───────╯

Funciones con mayor complejidad ciclomática
╭─────────────────────────────┬────────────────────┬─────┬──────╮
│ Archivo                     │ Función             │ CCN │ NLOC │
├─────────────────────────────┼────────────────────┼─────┼──────┤
│ ./core/git/metrics.py       │ bus_factor         │   9 │   26 │
│ ./core/git/metrics.py       │ summary            │   7 │   12 │
│ ./core/git/classifier.py    │ classify           │   6 │   11 │
╰─────────────────────────────┴────────────────────┴─────┴──────╯

Table labels are in Spanish for now; a language option is planned.

Roadmap

See docs/architecture.md for the full design and roadmap, and the Issues tab for near-term work in progress.

License

MIT

About

A CLI for mining git repositories: commit history metrics, code quality, and static analysis, in one report.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages