@artginzburg/github-user-downloads
v0.5.0
Published
Get total downloads of all repos by username
Downloads
35
Readme
Purpose
Getting total number of downloads for all releases of all repositories of a GitHub user by username
Preparation
Assuming you have Node.JS installed
- Create a Personal Access Token (Following GitHub Docs)
No scopes (permissions) needed — just the token
Usage
As a CLI
GITHUB_TOKEN=ghp_321yourPersonalAccessToken npx @artginzburg/github-user-downloads username
if username is ommited, uses $USER environment variable instead.
As an ES module
I'm personally using it via a GitHub Action with cron
to fetch my stats daily. Also, GitHub Actions provide you a GITHUB_TOKEN, with no need to create it manually.
Testing
- Clone the repo
- Install dependencies (
npm i
) - Set
GITHUB_TOKEN
andUSER
(if your local username is not the one you want to check) environmental variables (use.env
file if you want) - Run
npm test
, ornpm start username