Skip to content

mdanialr/github-asset-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Release Asset Downloader

CLI app to download assets from GitHub Releases. Can choose which version (using tag) and which arch to choose. Only supports Linux. Thanks to Viper you can use both arguments and config file but putting GitHub Access Token in the config file is recommended instead putting it in the arguments.

How to Use

  1. Download the binary from GitHub Releases
  2. Extract then run
tar -xvf github-asset-downloader....tar.gz
./github-asset-downloader --help # to see options

Example

Put token in config file with the name app.yml. The file name app.yml is mandatory otherwise Viper will not find it.

# config file app.yml

token: <YOUR_TOKEN>
# download asset linux amd64 from the latest release
./github-asset-downloader --repo username/repo-name
# download asset linux amd64 from the release tagged as v1.0.0
./github-asset-downloader --repo username/repo-name --tag v1.0.0
# download asset linux amd64 from the release tagged as v1.0.0 and output filename as my-asset
./github-asset-downloader --repo username/repo-name --tag v1.0.0 --output my-asset
# NOTE: file extensions will always be extracted from the asset's real name