Skip to main content

git-repostats

A fast CLI tool and library to analyze Git repositories and generate detailed contribution statistics.

Features

  • Author-wise contribution stats
  • High performance (Rust-based)
  • Metrics:
    • Commits
    • Files
    • Surviving lines
    • Insertions / Deletions
    • Net lines
    • Churn
  • Limit output (--limit)
  • Smart aggregation (OTHER bucket)

Installation

Using PIP

pip install git-repostats

Usage

git-repostats --metrics <metrics> --limit <N> <repo_path>
python -m git_repostats --metrics <metrics> --limit <N> <repo_path>

Documentation

Usage: git-repostats [OPTIONS] [GITDIR]...

Arguments:
  [GITDIR]...
          Git repository directory or directories to analyze.

          [default: .]

Options:
      --branch <BRANCH>
          Branch or tag up to which to check.

          [default: HEAD]

      --metrics <METRICS>...
          Select which metrics to compute.

          Possible values:
          - commits: Commit count per author
          - files:   Number of unique files modified by the author
          - history: Commit count, files, insertions, deletions, net change, and churn
          - current: Commit count, files, and surviving lines in the current code state
          - all:     Combine history and current metrics

          [default: commits]

      --sort <SORT>
          Sort output by the specified metric.
          Sorting is descending by default.

          Possible values:
          - commits:    Number of commits authored by the user
          - files:      Number of unique files modified by the user across all commits
          - insertions: Total number of lines added by the user
          - deletions:  Total number of lines removed by the user
          - net:        Net line change introduced by the user (insertions minus deletions)
          - churn:      Total lines of code modified by the user (insertions plus deletions)
          - surviving:  Number of lines currently present in the codebase that are attributed to the user

      --reverse
          Reverse the sort order from descending to ascending.

  -l, --limit <N|all>
          Limit number of authors displayed in the output. Use `all` for no limit.

          [default: 10]

      --since <DATE>
          Include only commits after the specified date.
          Accepts any date format supported by Git.

      --until <DATE>
          Include only commits before the specified date.
          Accepts any date format supported by Git.

      --show <SHOW>
          Author information to show.

          Possible values:
          - name:  Author name only
          - email: Author email only
          - both:  Author name and email

          [default: both]

  -M, --detect-moves
          Detect moved lines when computing metrics.
          Improves accuracy for refactors at the cost of performance.

  -C, --detect-copies
          Detect copied lines across files when computing metrics.

  -w, --ignore-whitespace
          Ignore whitespace-only changes when computing current metrics.

      --threads <THREADS>
          Number of parallel git operations. 0 = auto (min(CPU cores, 4)).

          [default: 0]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Example

git-repostats --metrics all --limit=5 "/path/to/sample-repo"
Done sample-repo in 2 seconds
==========================================================================================================================
 Repository: sample-repo
==========================================================================================================================
 Author                                                Commits ↓  Files  Surviving  Insertions  Deletions      Net   Churn
--------------------------------------------------------------------------------------------------------------------------
 Alice <alice@example.com>                                    50    120      8,500      +5,000     -1,200   +3,800   6,200
 Bob <bob@example.com>                                        30     80      5,200      +3,000       -900   +2,100   3,900
 Charlie <charlie@example.com>                                20     40      2,800      +1,500       -300   +1,200   1,800
 David <david@example.com>                                    15     35      2,100      +1,200       -200   +1,000   1,400
 Eve <eve@example.com>                                        10     25      1,400        +900       -150     +750   1,050
--------------------------------------------------------------------------------------------------------------------------
 OTHER (3 authors)                                            12     30      1,800      +1,000       -250     +750   1,250
--------------------------------------------------------------------------------------------------------------------------
 TOTAL (8 authors)                                           137    330     23,800     +13,600     -3,000  +10,600  15,600

Contributing

Contributions are welcome! Feel free to open issues or PRs.

License

The git-repostats is licensed under the terms of the MIT license.

Metadata

Release files for git-repostats 0.1.0

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-repostats 0.1.0
File Size Uploaded Provenance Actions
git_repostats-0.1.0.tar.gz 16.4 kB With provenance Details for git_repostats-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for git-repostats 0.1.0
File Actions
git_repostats-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for git_repostats-0.1.0-py3-none-win_amd64.whl
git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl
git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl
git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl
git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 5.5 MB

Release files / git_repostats-0.1.0.tar.gz

Download URL git_repostats-0.1.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6cb1fc3cffb8ea5bb58605fe4da1182f839867e34acf32b85bca5049bbe3c41f
BLAKE2b-256 checksum
How to use checksums
4920cb014a4fc763c67b9bcaaba36e374beaeb676d0ebea804cf142a11fa2452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-win_amd64.whl

Download URL git_repostats-0.1.0-py3-none-win_amd64.whl
Size 726.4 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
fc5ef0277a976a3035e23b4972de185b2b967ab83235da503be7d2231b4067f7
BLAKE2b-256 checksum
How to use checksums
86bcdf46199522de486791b315fdba8e2d2946e950b62a239bdf270875a38245
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl

Download URL git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Size 838.7 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
65dbcc974d4dde0e01812fa87c7da0f8119fb20ac08a1355b4bfba7a9bd706cf
BLAKE2b-256 checksum
How to use checksums
94295bda34f0673da2ae1fa2e98592aa5831838f982ef526b84687493ed40ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl

Download URL git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Size 783.1 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
39dfab4ecc2132f589ad3fffd6014412da957c48c35b8d82f0d05d70bf97d17e
BLAKE2b-256 checksum
How to use checksums
cbeb580f2ac482fea0cea6617cc38e5fc5a1c8a142ab2097cfc799b504e34a53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 838.3 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f07e071f7d29982bccc5530c1065ce434315d40013dcfe6293319665ec03c13d
BLAKE2b-256 checksum
How to use checksums
787795ae27505453fc4eea54f7b62a39caddc30f384402c4e201a35e87374848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 782.6 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b6e8cb1f302ffc21cb9288f2044d19b14776bc227daf03338d7f4f4ee08e6134
BLAKE2b-256 checksum
How to use checksums
1fd68229d4d8f6b5e0e4e751e279d0c4fae81b21d982a00c69dbae8a25746c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 716.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5b6afab781f9c8f6506f99aa6a792382ce38b2784ccf320994c1032b09eb4d0a
BLAKE2b-256 checksum
How to use checksums
688c4554132f228ea16242023a5e4920707d3cd42031c16e5cf130d19750d0f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 779.5 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
520e4157a25dbefc44df0f1ad9e1f5cf4b42a4a62bbc2105cca7898e645a29bb
BLAKE2b-256 checksum
How to use checksums
497b042dccc446012d494ca5e6f1e33be231eb8aa19d7c5e71d03035789325d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Security for git-repostats 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for git_repostats-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

8 release files Full provenance

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