Git Archaeologist
A python CLI tool for quickly analyzing and exploring the history of Git repositories.
Problem
Understanding a Git repository's history can be very time consuming when done manually. Git provides a huge amount of information, but finding useful patterns-such as the repository's lifespan, periods of inactivity, most active months, contributors, and commit history-often requires running multiple commands and manually interpreting the results.
Git Archaeologist simplifies this process by collecting important repository statistics and presenting them in a clear human-readable format or a JSON format for developers.
Features
-
Repository summary
- Total commits
- Number of contributors
- Number of lines changed
- Total insertions
- Total deletions
- Total lines changed
-
Timeline analysis
- First commit
- Latest commit
- Repo Lifespan
-
Activity analysis
- Most active month
- Number of commits during the most active month
- Longest period of inactivity
- Commits marking the begining and end of the longest gap
-
Commit History
- Commit SHA1
- Commit data
- Commit message
- Author
-
JSON output
- Machine-readable repository statistics
- Useful for scripts, automation and other apps
Installation
Clone the repository:
$ git clone https://github.com/omarelhalaby76-coder/git-archaeologist
$ cd git-archaeologist
Install the dependencies:
$ pip install -r requirments.txt
Or install the project directly:
$ pip install git-archaeologist
Usage
where . is the path to the repository show a summary:
$ git-archaeologist . --summary
show history:
$ git-archaeologist . --history
show activity:
$ git-archaeologist . --activity
show JSON:
$ git-archaeologist . --json
show timeline:
$ git-archaeologist . --timeline
show an overview:
$ git-archaeologist .
show version:
$ git-archaeologist --version
help:
$ git-archaeologist --help
requirments
- python 3.x
- git
- gitpython
how it works
Git Archaeologist uses GitPython to access the repository and analyze its commit history. The analyzer iterates through the repository's commits and calculates statistics including: Repository lifespan Contributors Files changed Insertions and deletions Monthly commit activity Longest gap between commits Complete commit history The CLI then presents the collected information in different formats depending on the selected option.
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 git_archaeologist-1.0.1.tar.gz.
File metadata
- Download URL: git_archaeologist-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5e17d2584bda4573d554d02408bed67b06a0077d2548d5e913b85eacf860a84
|
|
| MD5 |
1e647f17816c11e46dd425171f037f52
|
|
| BLAKE2b-256 |
50537a525278fdf70a279a84eb578a24ce1de046366d64479f898efe98330051
|
File details
Details for the file git_archaeologist-1.0.1-py3-none-any.whl.
File metadata
- Download URL: git_archaeologist-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a597f64c1d025855dd20ea4b8b9475d149359715ba7b6154125dc534cb01e4cc
|
|
| MD5 |
870fc222aebdd111989e2f839f53d413
|
|
| BLAKE2b-256 |
13fcfceb23190ba54646dcadb96b30f53956f0f8fe0c7e5fa6fe3836818e69c6
|