Visualize the evolution of a Git repository's languages and size
You, too, can have your repository visualized like this!
-
Repose uses Tokei for LOC calculations, so you need it installed and on your path. If you're compiling Tokei by yourself, make sure JSON serialization is enabled.
-
You can also alternately put tokei-tar on your PATH, and it will be used for faster and less disk-intensive computation.
-
I'll assume you have uv; if you don't, create a Python 3 virtualenv or something, then
pip install -e ..
- Run
uv run -m repose scan -d my-repo.sqlite3 my-repo-path. - Run
uv run -m repose chart my-repo.sqlite3. - Open
chart.html. Yay!
- By default, the repo is scanned at a 1 day interval. You can pass in
-r(for "resolution") to change this, e.g.-r 1wfor a week, etc. This also works forchart. - You can hang on to the database file to avoid having to rescan all of the repository's history.
- Thanks to Tokei's data format, the database contains per-file statistics too (though there is no visualizer for those yet). Maybe you can think of something to do with them?
- You can install
orjsonfor faster JSON handling.
