CLI for Linux, MacOS, Windows
- Downloads files and directories from GitHub repos
- Does not create/modify local Git repos
- Files may be public or private (to which you have access)
hubget
will use gh
internally. So you won't have to bother with
authentication when you have gh
configured.
gh
is an official GitHub CLI. Install it from
here.
Download and extract a binary executable release:
Alternatively, get the executable via the command line
# download and extract to current working directory
wget -c -O - \
https://github.com/rtmigo/hubget/releases/latest/download/hubget_linux_amd64.tgz \
| tar -xz
# check it runs
./hubget --version
# maybe move to some directory in your $PATH
mv -v ./hubget "$HOME/.local/bin/"
Download remote file.txt
to local file localname.txt
:
hubget https://github.com/user/repo/file.txt localname.txt
Just print the file to terminal:
hubget https://github.com/user/repo/file.txt
Or pipe to other process. For example, extract the file contents without saving the archive a file:
hubget https://github.com/user/repo/file.tgz | tar -xz
Download remote file.txt
to local targetdir/file.txt
:
hubget https://github.com/user/repo/file.txt targetdir/
Or into the current working directory (note the dot at the end):
hubget https://github.com/user/repo/file.txt .
Download all files from remote dir
storing them inside local targetdir
:
hubget https://github.com/user/repo/dir/ targetdir/
This project not endorsed or associated with GitHub.
Copyright © 2022 Artsiom iG. Released under the MIT License.