npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-release-downloader

v1.2.1

Published

CLI tool to download all release assets from a git repository

Downloads

17

Readme

github-release-downloader

npm version Build status CircleCI license

Installation

Installing the cli tool is as easy as this:

npm install -g github-release-downloader

Simple usage

For example, to download all node-sass's binaries:

grd --token <your github api token> --owner sass --repository node-sass

To download all node-sass's binaries for versions above v4.0.0 you would do

grd --token <your github api token> --owner sass --repository node-sass --min-version v4.0.0

PS: to get a personal api token you'll need to generate one. No special right is required.

Advanced usages

1. Custom download path

By default the download path is the path from where you ran node. But it's easy to override this with the the option --output (or -o if you feel that life is too short).

grd --token <your github api token> --owner sass --repository node-sass --output local-cache

2. Parallel download

By default downloads are launched in parrallel; 3 downloads at a time. You can ofcourse specify a more appropriate number if you like:

grd --token <your github api token> --owner sass --repository node-sass --parallel 10

3. Filter assets

By default you get all assets available. No filter is applied. Let's imagine that you're only interested in linux & windows binaries. You would use --filter-asset.

grd --token <your github api token> --owner sass --repository node-sass --filter-asset '^(win32-ia32|win32-x64|linux-ia32|linux-x64)'

4. Filter versions

You have two possibilities here:

--min-version and you'd download all versions starting from the argument (this respects semver).

grd --token <your github api token> --owner sass --repository node-sass --min-version "v4.0.0"

or you can use --match-version and pass a regexp. Here are some examples

# Download only the version v4.0.0
grd --token <your github api token> --owner sass --repository node-sass --match-version "^v4\.0\.0$"

# Download only all versions v4.0.x v4.1.x v4.2.x
grd --token <your github api token> --owner sass --repository node-sass --match-version "^v4\.(0|1|2)\."

# Download all win23-x64 assets of all alpha versions since v1
grd --token <your github api token> --owner sass --repository node-sass --min-version "v1.0.0-alpha" --match-version "alpha" --filter-asset "^win32-x64"

5. Using a HTTP/HTTPS proxy

If you're behind a http/https proxy, you can also use it with grd with those parameters:

# Use the defaut proxy ($http_proxy or $https_proxy)
grd --token <your github api token> --owner sass --repository node-sass --proxy

# Use an explicit proxy
grd --token <your github api token> --owner sass --repository node-sass --proxy "https://username:password@proxy:port/"

Other types of proxies are not supported.

6. Ignore missing assets

Sometimes, GitHub releases may reference assets that are no longer available. Maybe the asset has since been deleted, but GitHub's api still references it. By default, since v1.2.0, if we the asset that we try to download is missing a warning is logged and we carry on with the other tasks. You can override this behavior if you'd prefer to raise a fatal error and stop the process by passing --no-ignore-missing-assets.

#
grd --token <your github api token> --owner sass --repository node-sass --match-version "^v4.6.1" --filter-asset "win32-ia32-45_binding.pdb" --no-ignore-missing-assets