Github Stats Collector is a tiny cli that helps to collect stats for public repositories.
The quickest way to start: docker run mskutin/gsc get --help
Platforms supported:
wget -c https://github.com/mskutin/gsc/releases/download/v0.3-alpha/gsc-darwin-amd64.tar.gz -O - | tar -xz && \
mv gsc /usr/local/bin/gsc
Installation on other platforms may be different.
Clone the repository: git clone https://github.com/mskutin/gsc
go build
./gsc help
docker build -f build/package/cli/Dockerfile . -t gsc
docker run gsc get --help
Repository stats can be retrieved by calling a get
command:
Usage:
gsc get [flags]
Flags:
-f, --format string --format tsv (default "csv")
-h, --help help for get
-r, --repos strings One or more repositories: 'gsc get -r mskutin/gsc'
See help for more examples.
By default gsc
interacts with GitHub API anonymously.
Since GitHub's default request rate is only 60 req/h you may run out of this limit shortly.
You can set GITHUB_TOKEN
and GITHUB_USERNAME
environment variables to authorize gsc in GitHub.
1) gsc get -r mskutin/gsc
2) gsc get --repos=mskutin/gsc
name,clone_url,last_commit_author,last_commit_date
mskutin/gsc,https://github.com/mskutin/gsc.git,Maksim Skutin,2020-07-07 05:43:31 +0000 UTC
1) gsc get -f tsv \
-r mskutin/gsc \
-r mskutin/nginx-fluentd \
-r helm/charts
2) gsc get -r=helm/charts,mskutin/gsc
3) echo "helm/charts,mskutin/gsc" | xargs gsc get -r
name,clone_url,last_commit_author,last_commit_date
mskutin/gsc,https://github.com/mskutin/gsc.git,Maksim Skutin,2020-07-07 05:43:31 +0000 UTC
helm/charts,https://github.com/helm/charts.git,Maxime Brunet,2020-07-07 11:51:58 +0000 UTC
gsc get [flags]
Flags:
-f, --format string --format tsv (default "csv")
./gsc get -f tsv \
-r mskutin/gsc \
-r helm/charts \
-r github/hubot
name clone_url last_commit_author last_commit_date
mskutin/gsc https://github.com/mskutin/gsc.git Maksim Skutin 2020-07-10 20:10:52 +0000 UTC
helm/charts https://github.com/helm/charts.git jabdoa2 2020-07-11 17:39:23 +0000 UTC
hubotio/hubot https://github.com/hubotio/hubot.git Misty De Meo 2019-04-17 04:49:47 +0000 UTC
By default, gsc uses csv format output.
The following types of output are supported:
- csv
- tsv
- table