Fast Git analytics tool powered by Rust, providing detailed author contribution statistics including commits, lines of code, insertions, deletions, and churn.
Project description
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 (
OTHERbucket)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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_repostats-0.1.0.tar.gz.
File metadata
- Download URL: git_repostats-0.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb1fc3cffb8ea5bb58605fe4da1182f839867e34acf32b85bca5049bbe3c41f
|
|
| MD5 |
a9b9d2beedd872fe45e983418bdee5b3
|
|
| BLAKE2b-256 |
4920cb014a4fc763c67b9bcaaba36e374beaeb676d0ebea804cf142a11fa2452
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0.tar.gz:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0.tar.gz -
Subject digest:
6cb1fc3cffb8ea5bb58605fe4da1182f839867e34acf32b85bca5049bbe3c41f - Sigstore transparency entry: 1417943790
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-win_amd64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-win_amd64.whl
- Upload date:
- Size: 726.4 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc5ef0277a976a3035e23b4972de185b2b967ab83235da503be7d2231b4067f7
|
|
| MD5 |
959675bfdde2be23c6057dbc69211f74
|
|
| BLAKE2b-256 |
86bcdf46199522de486791b315fdba8e2d2946e950b62a239bdf270875a38245
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-win_amd64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-win_amd64.whl -
Subject digest:
fc5ef0277a976a3035e23b4972de185b2b967ab83235da503be7d2231b4067f7 - Sigstore transparency entry: 1417943828
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 838.7 kB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65dbcc974d4dde0e01812fa87c7da0f8119fb20ac08a1355b4bfba7a9bd706cf
|
|
| MD5 |
2e62170e1d642d632a5bceadedfa3bf1
|
|
| BLAKE2b-256 |
94295bda34f0673da2ae1fa2e98592aa5831838f982ef526b84687493ed40ba2
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
65dbcc974d4dde0e01812fa87c7da0f8119fb20ac08a1355b4bfba7a9bd706cf - Sigstore transparency entry: 1417943799
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 783.1 kB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39dfab4ecc2132f589ad3fffd6014412da957c48c35b8d82f0d05d70bf97d17e
|
|
| MD5 |
2945f411d791ac45551e1053a8ea4fdd
|
|
| BLAKE2b-256 |
cbeb580f2ac482fea0cea6617cc38e5fc5a1c8a142ab2097cfc799b504e34a53
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
39dfab4ecc2132f589ad3fffd6014412da957c48c35b8d82f0d05d70bf97d17e - Sigstore transparency entry: 1417943807
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 838.3 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07e071f7d29982bccc5530c1065ce434315d40013dcfe6293319665ec03c13d
|
|
| MD5 |
68ecc0f57e28c2f6e4cc46d80e5152ed
|
|
| BLAKE2b-256 |
787795ae27505453fc4eea54f7b62a39caddc30f384402c4e201a35e87374848
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
f07e071f7d29982bccc5530c1065ce434315d40013dcfe6293319665ec03c13d - Sigstore transparency entry: 1417943816
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 782.6 kB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e8cb1f302ffc21cb9288f2044d19b14776bc227daf03338d7f4f4ee08e6134
|
|
| MD5 |
05b1ab1880877597aad21b01b4693420
|
|
| BLAKE2b-256 |
1fd68229d4d8f6b5e0e4e751e279d0c4fae81b21d982a00c69dbae8a25746c73
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
b6e8cb1f302ffc21cb9288f2044d19b14776bc227daf03338d7f4f4ee08e6134 - Sigstore transparency entry: 1417943812
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 716.6 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6afab781f9c8f6506f99aa6a792382ce38b2784ccf320994c1032b09eb4d0a
|
|
| MD5 |
89cad543a817df962e4f879f763e8945
|
|
| BLAKE2b-256 |
688c4554132f228ea16242023a5e4920707d3cd42031c16e5cf130d19750d0f3
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
5b6afab781f9c8f6506f99aa6a792382ce38b2784ccf320994c1032b09eb4d0a - Sigstore transparency entry: 1417943802
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 779.5 kB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
520e4157a25dbefc44df0f1ad9e1f5cf4b42a4a62bbc2105cca7898e645a29bb
|
|
| MD5 |
855b005704fe79792033c0cc0696065d
|
|
| BLAKE2b-256 |
497b042dccc446012d494ca5e6f1e33be231eb8aa19d7c5e71d03035789325d3
|
Provenance
The following attestation bundles were made for git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on kishorninawe/git-repostats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
git_repostats-0.1.0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
520e4157a25dbefc44df0f1ad9e1f5cf4b42a4a62bbc2105cca7898e645a29bb - Sigstore transparency entry: 1417943795
- Sigstore integration time:
-
Permalink:
kishorninawe/git-repostats@2b29403909552281f5732a0624a75fe0a525d882 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kishorninawe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b29403909552281f5732a0624a75fe0a525d882 -
Trigger Event:
workflow_dispatch
-
Statement type: