A command-line program written in Python for downloading GitHub release assets.
github-release-downloader on PyPI is a completely distinct project authored by MaxBQb. Check out their repository if you are interested in a library+CLI for the same purpose!
A Personal Access Token can be provided to the program using the grd auth
command. This allows for making authenticated API requests, which are not
limited to the usual 60 requests/hour rate limit. This application only
requires read permission for whatever repositories you will be downloading
from (for classic tokens, they should have the repo:public_repo
permission).
API responses are cached in an SQLite database to reduce API requests that would count against your current rate limit.
If the SQLite library used by your Python installation has encryption support
(for example SEE, SQLCipher, and SQLiteMultipleCiphers), the grd encrypt
command can be used to add a custom passphrase, protecting your access token from
being misused. Each time the database needs to be opened, you will be prompted
for your passphrase.
- Python 3.11 or higher
-
Install github-release-downloader.
If you have Git installed, you can run the following command:
pip install git+https://github.com/thegamecracks/github-release-downloader
For users without Git, you can download the repository as a zip, then extract it, open a terminal inside the directory, and run:
pip install .
Several dependencies are required by this project so installing in a virtual environment is recommended. If you prefer to not handle the virtual environment yourself, installing this through pipx is a good alternative:
pip install pipx # see their proper installation instructions on PyPI pipx install git+https://github.com/thegamecracks/github-release-downloader
-
(Optional) Create and add a Personal Access Token.
-
Run
grd download <owner> <repo>
to download an asset from that repository, or alternativelypython -m grd download <owner> <repo>
.
- src/
- alembic/ - Contains the alembic database migration scripts.
- cli/ - Implements the command-line interface with Click.
- client/ - Provides the API client and Pydantic models to interact with GitHub.
- database/ - Defines the SQLAlchemy models and connections to the SQLite database.
-
list <owner> <repo>
- list available releases for a repository - Allow downloading tar/zip archives
- Terminal user interface (perhaps with textual?)