A tool for downloading and repackaging binary releases from GitHub.
Bindl simplifies the process of maintaining mirrors of binary releases from GitHub projects. It:
- Fetches the latest release of a specified GitHub repository
- Downloads selected assets based on configurable patterns
- Extracts specific files from tarballs
- Recompresses them with zopfli for optimal compression
- Organizes them in a customizable directory structure
This directory structure could then be synchronized to remote storage.
- Python 3.8+
- zopfli command-line utility
bindl configs/uv.toml -o out/Bindl uses TOML files to specify what to download and how to organize the output.
Here's an example (in fact, examples/uv.toml):
[source]
github = "astral-sh/uv"
included-release-files = [
".*darwin.*tar.gz$",
".*(x86_64|aarch64).*linux.*gnu.*tar.gz$",
]
included-tarball-member-names = [
"^.+/uv(x)?$",
]
[target]
gz-pattern = "{release_name}/{asset_name_cleaned|basename|strip_ext}/{name|basename}.gz"github: GitHub repository in formatowner/repoincluded-release-files: List of regex patterns to match release assets to downloadincluded-tarball-member-names: List of regex patterns to match files to extract from tarballs
-
gz-pattern: Pattern for final output file paths, supporting the following variables:{release_name}: Release version{asset_name}: Original asset filename{asset_name_cleaned}: Asset name with project name and version prefixes removed{name}: Original file path within the tarball
Filters (applied with
|):basename: Extract basename of a pathstrip_ext: Remove file extensionstrip_tar: Remove .tar extension
MIT