An easier way to find and automate file downloads from GitHub and GitLab repositories. Learn more from the examples and documentation at gget.io.
- Standalone CLI - no
git
or local clones required - Public & Private Servers - supporting both GitHub and GitLab
- Public & Private Repos - API-based access for private resources
- Tags, Branches, and Commits - also semver-based constraint matching
- Archives, Assets, and Blobs - download any type of resource from repos
- Built-in File Operations - easy rename, binary, and stream options
- Checksum Verification - verify downloads by SHA (if published)
- Open-Source Project - contribute and discuss at dpb587/gget
Pass the repository and file globs to match and download.
$ gget github.com/gohugoio/hugo 'hugo_extended_*_Linux-64bit.deb'
Found 1 file (13.9M) from github.com/gohugoio/[email protected]
√ hugo_extended_0.73.0_Linux-64bit.deb done (sha256 OK)
Use --help
to see the full list of options for more advanced usage.
Binaries for Linux, macOS, and Windows can be downloaded from the releases page. A Homebrew recipe is also available for Linux and macOS.
brew install dpb587/tap/gget
The gget
image can be used as a build stage to download assets for a later stage.
FROM ghcr.io/dpb587/gget/gget as gget
RUN gget --executable github.com/cloudfoundry/bosh-cli --ref-version=5.x bosh=bosh-cli-*-linux-amd64
RUN gget --executable github.com/cloudfoundry/bosh-bootloader bbl=bbl-*_linux_x86-64
RUN gget --stdout github.com/pivotal-cf/om om-linux-*.tar.gz | tar -xzf- om
FROM ubuntu
COPY --from=gget /result/* /usr/local/bin/
# ...everything else for your image...
When downloading files, gget
attempts to validate checksums when they are found for files (erroring if they do not match). Since checksums are not an official feature for repository assets, the following common conventions are being used.
- Algorithms:
sha512
,sha256
,sha1
,md5
- File Format:
shasum
/md5sum
output ({checksum} {file}
) - Sources:
- release notes - code block or code fence
- sibling files with an algorithm suffix (case-insensitive) -
*.{algorithm}
- checksum list files (case-insensitive) -
checksum
,checksums
,*checksums.txt
,{algorithm}sum.txt
,{algorithm}sums.txt
wget
/curl
-- if you want to manually maintain version download URLs and private signinghub release download ...
-- if you already havegit
configured and a cloned GitHub repositoryfetch
-- similar tool and capabilities for GitHub (discovered this after [email protected])