#download #artifact #github #filename #command-line-tool #name #file

bin+lib gird

A command line tool and library for downloading release artifacts

4 releases

0.2.0 Apr 11, 2024
0.1.2 Mar 18, 2024
0.1.1 Mar 18, 2024
0.1.0 Mar 18, 2024

#2155 in Command line utilities

Download history 300/week @ 2024-03-17 6/week @ 2024-03-24 68/week @ 2024-03-31 114/week @ 2024-04-07 6/week @ 2024-04-14

213 downloads per month

MIT license

17KB
270 lines

Gird

Gird is a command-line tool for downloading release artifacts. Currently, it supports downloading from GitHub releases, and there’s room to expand it to other, similar sources.

Downloading from GitHub

Given an artifact name, user name, and repository name, Gird will locate the most recent release for that repository, find a release artifact with a matching file name, and download it.

For example, to download the current rqlite release for linux on amd64, we can do the following:

$ gird linux-amd64 -e musl github rqlite rqlite

In that example, linux-amd64 is telling gird that we want a release file which contains “linux-amd64” in its file name, -e musl is telling it that we don’t want the variant that has “linux-amd64-musl“ in its file name even though it would otherwise match, github is telling it that it should source the file from a GitHub release, the first rqlite is telling it to look under the GitHub user called “rqlite” and the second rqlite is telling it that we want that user’s repository which is also called “rqlite”.

Gird will look through the current GitHub release for the specified repository, find a matching file (e.g. rqlite-v8.23.0-linux-amd64.tar.gz), and download it.

It’s also a library

Gird can also be added to your Cargo.toml and used programmatically in other Rust programs. Each source for downloading release artifacts has its own module within the crate, containing specialized tools for interacting with that source.

Community

If you encounter a bug, feel free to add a ticket to the Gird todo list.

If you would like to discuss Gird or request help, the gird-users mailing list is here for you.

Patches can be submitted via git send-email or git format-patch to ~djarb/gird-patches@lists.sr.ht (a.k.a the gird-patches mailing list). If you’re not familiar with the git send-email command, SourceHut provides a useful tutorial.

You could also clone the repository into your own SourceHut repo, make your changes, commit and push them to your cloned repo, and use the “Prepare a patchset” button on your repo page to send the changes. This is equivalent to GitHub’s pull request workflow.

Dependencies

~5.5–8MB
~176K SLoC