#github #download #forgejo #release #git

app gitweb-release-downloader

Allows you to download release assets from GitHub and Gitea (thus Forgejo is supported, too) and GitLab

3 stable releases

1.1.1 Dec 1, 2024
1.1.0 Nov 23, 2024
1.0.0 Oct 29, 2024

#1114 in Command line utilities

Download history 105/week @ 2024-10-25 24/week @ 2024-11-01 3/week @ 2024-11-08 4/week @ 2024-11-15 135/week @ 2024-11-22 128/week @ 2024-11-29 18/week @ 2024-12-06

285 downloads per month

GPL-3.0-only

40KB
954 lines

gitweb-release-downloader

Allows you to download release assets from GitHub and Gitea (thus Forgejo is supported, too) and GitLab.
Additionally you can query a repository's releases and their respective assets.

Usage

Downloading VSCodium:

grd download "github.com/VSCodium/vscodium" "\\.deb$"

Alternatively:

grd download --website-type github "VSCodium/vscodium" "\\.deb$"

First argument is the repository
Second argument is a regex pattern for the asset to download
--website-type takes the type of git website (if this is omitted, the program tries to guess it from the passed repository, "github.com" and "gitlab.com" can currently be guessed).

Downloading from the latest release of Forgejo on codeberg.org:

grd download --website-type gitea codeberg.org/forgejo/forgejo ".*"

It automatically takes the latest release, which is not a prerelease.
Alternatively it takes a tag to download with --tag.
If you want to allow prereleases (or upcoming releases for GitLab) add --prerelease.

You can also make the program print the downloaded file name and pipe it to another program or save it in a variable.
This for example allows automatic installation:

filename=$(grd download "github.com/VSCodium/vscodium" "\\.deb$" --print-filename)
sudo apt install "./$filename" && rm "$filename"

To query releases of a repository:

grd query releases "github.com/VSCodium/vscodium"

By default it will only print the latest release, which is not a prerelease.
You can change this with the --count and --prerelease flag.

To query assets of a repository:

grd query assets "github.com/VSCodium/vscodium"

By default this will print all assets of the latest release, which is not a prerelease.
To query from a specific release you can use the --tag flag (including prereleases).
Limiting the assets to show is done with the --asset-pattern flag.

Dependencies

~9–18MB
~240K SLoC