GitHub release downloader CLI
-
Use
docker
-
One line
docker run --rm -v /tmp:/tmp zero88/ghrd:latest -h
-
Register as alias in
~/.bash_alias
or~/.bash_rc
cat >> ~/.bash_alias <<EOL #### GHRD GHRD_VERSION=1.1.1 alias ghrd="docker run --rm -v /tmp:/tmp zero88/ghrd:$GHRD_VERSION" EOL source ~/.bashrc
-
-
Use binary in release
-
Debian/Ubuntu
export GHRDVER=1.1.2 && sudo curl -L https://github.com/zero88/gh-release-downloader/releases/download/v$GHRDVER/ghrd -o /usr/local/bin/ghrd \ && sudo chmod +x /usr/local/bin/ghrd \ && sudo ln -s /usr/local/bin/ghrd /usr/bin/ghrd \ && sudo apt install jq -y \ && unset GHRDVER
-
Fedora/CentOS/RedHat
export GHRDVER=1.1.2 && sudo curl -L https://github.com/zero88/gh-release-downloader/releases/download/v$GHRDVER/ghrd -o /usr/local/bin/ghrd \ && sudo chmod +x /usr/local/bin/ghrd \ && sudo ln -s /usr/local/bin/ghrd /usr/bin/ghrd \ && sudo yum install jq -y \ && unset GHRDVER
-
MacOS
export GHRDVER=1.1.2 && sudo curl -L https://github.com/zero88/gh-release-downloader/releases/download/v$GHRDVER/ghrd -o /usr/local/opt/ghrd/$GHRDVER \ && ln -s /usr/local/opt/ghrd/$GHRDVER/ghrd /usr/local/bin \ && sudo chmod +x /usr/local/bin/ghrd \ && brew install jq \ && unset GHRDVER
-
If you want to use ghrd
locally, please make sure you have these programs before using
curl
jq
grep
|awk
|td
|fold
$ ghrd -h
<GitHub release downloader>
Usage: ./ghrd [-r|--release <arg>] [-t|--pat <arg>] [-a|--artifact <arg>] [-x|--(no-)regex] [-p|--parser <arg>] [-s|--source <SOURCE>] [-o|--output <arg>] [--(no-)debug] [-h|--help] [-v|--version] <repo>
<repo>: GitHub repository. E.g: zero88/gh-release-downloader
-r, --release: A release version (default: 'latest')
-t, --pat: GitHub Personal access token (no default)
-a, --artifact: Artifact name (no default)
-x, --regex, --no-regex: Use regex to search artifact (off by default)
-p, --parser: Use custom jq parser instead of search by artifact name (no default)
-s, --source: Download Repository Source instead of release artifact. Can be one of: 'zip', 'tar' and '' (no default)
-o, --output: Downloaded directory (default: '/app')
--debug, --no-debug: Debug option (off by default)
-h, --help: Prints help
-v, --version: Prints version
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This project is licensed under the Apache License - see the LICENSE file for details
Awesome bash arguments from Argbash