Get GitHub Download Release Metrics

Cody Hosterman, Argenis Fernandez and I have posted a lot of content to GitHub and one of the details I always wanted to know was “# of downloads for project X”. Although GitHub provides some nice traffic and cloning graphs it still does not show the number of downloads for a release. So I took to the GitHub API and PowerShell to figure it out. The below script can be run with three parameters:

  1. $gitHubRepository
  2. $gitHubUserName
  3. $gitHubApiKey

As an example I have used the Pure Storage PowerShell SDK to show sample results. The URL for the PowerShell SDK is

  1. $gitHubRepository = powershellsdk
  2. $gitHubUserName = purestorage-openconnect
    Note: Change this to your specific username to run against your own Public and Private repos.
  3. $gitHubApiKey — Log into your GitHub account and navigate to to generate a new API token or find an existing token.

PowerShell script:

Sample output:

Download the script Get-GitHubRelDownloads.ps1 from Be sure to check for all of our open source projects and scripts.


Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.