Skip to content

Instantly share code, notes, and snippets.

@timsutton
Last active November 10, 2022 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timsutton/49bb1e9682c64c0d26fc46c448d7aebc to your computer and use it in GitHub Desktop.
Save timsutton/49bb1e9682c64c0d26fc46c448d7aebc to your computer and use it in GitHub Desktop.
One-liner to give a total count of all downloads of a project's GitHub releases, over all time
owner=timsutton
repo=brigadier
curl -s "https://api.github.com/repos/${owner}/${repo}/releases \
| jq . \
| grep download_count \
| cut -d : -f 2 \
| tr -d ' ,' \
| awk '{s+=$1} END {print s}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment