Skip to main content

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.

Metadata

Release files for git-archaeologist 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-archaeologist 1.0.1
File Size Uploaded
git_archaeologist-1.0.1.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-archaeologist 1.0.1
File Interpreter ABI Platform
git_archaeologist-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / git_archaeologist-1.0.1.tar.gz

Download URL git_archaeologist-1.0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d5e17d2584bda4573d554d02408bed67b06a0077d2548d5e913b85eacf860a84
BLAKE2b-256 checksum
How to use checksums
50537a525278fdf70a279a84eb578a24ce1de046366d64479f898efe98330051
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / git_archaeologist-1.0.1-py3-none-any.whl

Download URL git_archaeologist-1.0.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a597f64c1d025855dd20ea4b8b9475d149359715ba7b6154125dc534cb01e4cc
BLAKE2b-256 checksum
How to use checksums
13fcfceb23190ba54646dcadb96b30f53956f0f8fe0c7e5fa6fe3836818e69c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page