ghcurl: Download files and install from Github releases.
It works on Linux, Windows, macOS. It always gives you the proper option to download based on your os and arch. You can search by regular expression, specify a version, and install it to a path or according to the environment variable GHCURL_BIN_PATH or just /usr/local/bin. It will automatically extract a tar/zip file to make the installation process better.
Install
$ gem install ghcurlUsage
$ ghcurl [user/]repo [regexp] [options]-o
This is optional, download will default to ~/.cache/ghcurl
-
-o pathDownload into path -
-o path/nameDownload as path/name
-v
-
-v 1.0.0Download tag version 1.0.0 -
-v3.1.4This is also OK to download tag version 3.1.4
-i
-
-iInstall to/usr/local/binorGHCURL_BIN_PATH -
-i pathInstall to path
-r
-
-r nameInstall the binary as name
Example
Things can be easier. We consider these as popular binaries: https://github.com/ibraheemdev/modern-unix
Notice: -i means to install.
# It knows that's sharkdp/fd
ghcurl fd -i
# It's cli/cli !
ghcurl gh -i
# Much easier to install rbspy!
ghcurl rbspy -iDownload latest deb/rpm package and install, notice the argument deb / rpm are just regular expressions.
ghcurl cli/cli deb -i
ghcurl cli/cli rpm -iNormal download
# The easiest way to download
ghcurl gh
# Download to /tmp
ghcurl gh -o /tmp
# Download latest rbspy-x86_64-unknown-linux-gnu.tar.gz to ~/.cache/ghcurl
ghcurl rbspy/rbspy 'x86_64.*linux'
# Download rbspy version 0.11.1
ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1Download a binary and install it to anywhere
# Install to /usr/local/bin
ghcurl starship linux-gnu -i
# Install to ~/tmp/bin
ghcurl BetaPictoris/timeleft -i ~/tmp/bin
# Download as /tmp/github-cli and install
ghcurl gh -o /tmp/github-cli -i
# Install and rename it to, here, 'tldr' in /usr/local/bin
ghcurl dbrgn/tealdeer x86_64 -i -r 'tldr'
# or, like this
ghcurl dlvhdr/gh-dash linux-amd64 -i ~/tmp/bin/gd