https://github.com/mdanialr/github-asset-downloader
CLI to download GitHub release asset
https://github.com/mdanialr/github-asset-downloader
cli github-assets-downloader golang tool
Last synced: 5 months ago
JSON representation
CLI to download GitHub release asset
- Host: GitHub
- URL: https://github.com/mdanialr/github-asset-downloader
- Owner: mdanialr
- License: mit
- Created: 2022-08-06T13:32:42.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-06T13:48:11.000Z (almost 4 years ago)
- Last Synced: 2024-06-21T11:02:22.880Z (about 2 years ago)
- Topics: cli, github-assets-downloader, golang, tool
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/spf13/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](https://github.com/mdanialr/github-asset-downloader/releases)
2. Extract then run
```bash
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](https://github.com/spf13/viper) will not find it.
```yaml
# config file app.yml
token:
```
```bash
# 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
```