Github Release Installer Bash Script

The github-release-installer is a bash script that allows you to easily download and install assets from GitHub releases. It supports various options for customizing the installation process, such as specifying the release version, filtering assets by name, and performing dry runs.

Usage

Run the script with a GitHub repository in owner/repo format:

./github-release-installer [options] "owner/repo"

Examples:

# Install latest matching release asset for the current OS/arch
./github-release-installer cli/cli

# Preview what would be selected without downloading/installing
./github-release-installer --dry-run cli/cli

# List downloadable assets from the latest release
./github-release-installer --list cli/cli

# Install using explicit app and binary names
./github-release-installer --app-name "GitHub CLI" --binary-name gh cli/cli

# Download a specific asset file to a directory (no install)
./github-release-installer --file-name gh_2.70.0_macOS_arm64.zip --output-directory /tmp cli/cli

Useful options:

  • --dry-run [level]: test mode, print what would happen.
  • --list: print release asset URLs.
  • --file-name <name>: choose an exact asset name.
  • --type <archive|package|zip|tar.gz|tgz|deb|pkg|rpm>: filter by asset type.
  • --binary-name <src[:dest]>: install binary using optional destination name.
  • --output-directory <dir>: download only, do not install.
  • --releases-json: download latest release metadata as JSON.

For full help:

./github-release-installer --help
Description
A Shell script that installs Github Releases.
Readme MIT 36 KiB
Languages
Shell 100%