Command Line Interface
The command-line interface (CLI) for git-author-stats
is suitable
for outputting stats for a repository or Github org in a tabular data format
for subsequent analysis.
$ git-author-stats -h
usage: git-author-stats [-h] [-u USER] [-p PASSWORD] [--since SINCE]
[--after AFTER] [--before BEFORE]
[--until UNTIL] [-f FREQUENCY]
[--delimiter DELIMITER] [-nh] [-nm] [-md]
[-l LIMIT]
url [url ...]
Print author stats for a Github organization or Git repository in
CSV/TSV or markdown format
positional arguments:
url Repository URL(s)
optional arguments:
-h, --help show this help message and exit
-u USER, --user USER A username for accessing the repository
-p PASSWORD, --password PASSWORD
A password for accessing the repository
--since SINCE Only include contributions on or after this
date
--after AFTER Only include contributions after this date
--before BEFORE Only include contributions before this date
--until UNTIL Only include contributions on or before this
date
-f FREQUENCY, --frequency FREQUENCY
If provided, stats will be broken down over
time intervals at the specified frequency.
The frequency should be composed of an
integer and unit of time (day, week, month,
or year). For example, all of the following
are valid: "1 week", "1w", "2 weeks",
"2weeks", "4 months", or "4m".
--delimiter DELIMITER
The delimiter to use for CSV/TSV output
(default: ',')
-nh, --no-header Don't print the header row (only applies to
CSV/TSV output)
-nm, --no-mailmap Don't use mailmap to map author names to
email addresses
-md, --markdown Output a markdown table instead of CSV/TSV
-l LIMIT, --limit LIMIT
The maximum number of records to return. The
default is 0, indicating there is no limit.
Examples
Save weekly stats for your Github org as a CSV, authenticating using a personal access token:
git-author-stats --since 2024-01-01 --frequency 1w --password $GH_TOKEN \
https://github.com/enorganic > ./enorganic-author-stats.csv
Save weekly stats for a Github org as a TSV (public repos only):
git-author-stats --since 2024-01-01 --frequency 1w \
--delimiter "\t" https://github.com/enorganic > ./enorganic-author-stats.tsv
Print daily stats for a repo from July 29th - August 1st, as a markdown table:
git-author-stats -md \
--since 2024-07-29 \
--until 2024-08-01 \
-f 1d \
https://github.com/enorganic/git-author-stats.git
url | since | before | author_date | author_name | commit | file | insertions | deletions |
---|---|---|---|---|---|---|---|---|
https://github.com/enorganic/git-author-stats.git | 2024-08-01 | 2024-08-02 | 2024-08-01T01:03:41 | David Belais | 7bd7967 | git_author_stats/_stats.py | 1 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-08-01 | 2024-08-02 | 2024-08-01T00:14:20 | David Belais | f3e837d | git_author_stats/_stats.py | 0 | 3 |
https://github.com/enorganic/git-author-stats.git | 2024-08-01 | 2024-08-02 | 2024-08-01T00:06:21 | David Belais | 26a2afa | README.md | 5 | 6 |
https://github.com/enorganic/git-author-stats.git | 2024-08-01 | 2024-08-02 | 2024-08-01T00:01:00 | David Belais | 7461720 | git_author_stats/_stats.py | 1 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:58:25 | David Belais | 5ffa426 | git_author_stats/_stats.py | 13 | 33 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:42:22 | David Belais | 8562114 | tests/test_stats.py | 2 | 2 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | git_author_stats/init.py | 9 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | git_author_stats/main.py | 15 | 13 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | git_author_stats/_stats.py | 120 | 52 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | setup.cfg | 1 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | tests/stats.csv | 58983 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | tests/stats.md | 58984 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | tests/stats.tsv | 58983 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T23:06:50 | David Belais | 4974f42 | tests/test_stats.py | 56 | 2 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:47:19 | David Belais | b4a0b5f | git_author_stats/_stats.py | 14 | 8 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:41:06 | David Belais | 99f59fd | git_author_stats/init.py | 2 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:41:06 | David Belais | 99f59fd | git_author_stats/main.py | 7 | 90 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:41:06 | David Belais | 99f59fd | git_author_stats/_stats.py | 140 | 2 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:41:06 | David Belais | 99f59fd | requirements.txt | 3 | 3 |
https://github.com/enorganic/git-author-stats.git | 2024-07-31 | 2024-08-01 | 2024-07-31T06:41:06 | David Belais | 99f59fd | setup.cfg | 1 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T22:08:36 | David Belais | c42d567 | README.md | 9 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:52:43 | David Belais | e37df00 | git_author_stats/_stats.py | 3 | 3 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:50:34 | David Belais | b06f78b | git_author_stats/_stats.py | 4 | 6 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:16:44 | David Belais | 2e16532 | README.md | 140 | 150 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:16:44 | David Belais | 2e16532 | enorganic-author-stats.csv | 0 | 451 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:16:44 | David Belais | 2e16532 | git_author_stats/main.py | 33 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T21:16:44 | David Belais | 2e16532 | git_author_stats/_stats.py | 108 | 13 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:45:33 | David Belais | 2aea5ab | setup.cfg | 1 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:43:17 | David Belais | cade4a3 | enorganic-author-stats.csv | 451 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:39:58 | David Belais | 5e99fe6 | README.md | 53 | 27 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:39:58 | David Belais | 5e99fe6 | git_author_stats/main.py | 36 | 18 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:39:58 | David Belais | 5e99fe6 | tests/test_github.py | 22 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T18:39:58 | David Belais | 5e99fe6 | tests/test_stats.py | 20 | 1 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:55:31 | David Belais | b52106f | README.md | 3 | 2 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:46:42 | David Belais | 620dcdf | README.md | 142 | 34 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:23:39 | David Belais | 282b807 | stats.ipynb | 0 | 177 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | .flake8 | 7 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | .github/workflows/distribute.yml | 40 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | .github/workflows/test.yml | 47 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | .gitignore | 17 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | CONTRIBUTING.md | 56 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | Makefile | 87 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | README.md | 101 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | ci_requirements.txt | 2 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | dev_requirements.txt | 2 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | git_author_stats/init.py | 10 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | git_author_stats/main.py | 178 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | git_author_stats/_github.py | 53 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | git_author_stats/_stats.py | 662 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | git_author_stats/py.typed | 0 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | mypy.ini | 5 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | pyproject.toml | 28 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | requirements.txt | 67 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | setup.cfg | 27 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | setup.py | 3 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | stats.ipynb | 177 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | test_requirements.txt | 9 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | tests/test_github.py | 167 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | tests/test_stats.py | 166 | 0 |
https://github.com/enorganic/git-author-stats.git | 2024-07-30 | 2024-07-31 | 2024-07-30T04:17:29 | David Belais | 259e788 | tox.ini | 56 | 0 |