bwget is a minimalist yet powerful single-file downloader crafted in Python, designed to simplify and enhance your downloading experience. Inspired by the legendary GNU wget, bwget adds intuitive features, seamless torrent support, and sleek progress visuals all within a compact script.
- 🌐 HTTP/HTTPS Downloads: Effortlessly download files with an elegant progress bar powered by Rich.
- 🔗 Torrent Support: Download
.torrentfiles and magnet links with ease (single torrent at a time, no seeding). - 📁 Automatic Filename Detection: Picks the perfect filename from URLs or server headers.
- ⏳ Resume Capability: Seamlessly continue interrupted downloads.
- 🔐 Secure Connections: Robust TLS verification, with an option to bypass (
--no-check-certificate). - 🛡️ SHA-256 Verification: Automatically verifies file integrity via SHA-256.
- 🔄 Automatic Retries: Smart retries with exponential backoff for robust downloads.
- 📃 Batch Downloads: Handle multiple downloads effortlessly from a list file (
urls.txt). - 🌀 Bandwidth Throttling: Limit download rates with
--limit-rateor via configuration. - 🌱 Torrent Controls: Restrict peer count with
--max-seedsand configurable listen ports. - 🛠️ Configurable: Customize behavior easily through a convenient TOML config file.
- Python 3.8+
requestsandrichpackageslibtorrent(optional, required for torrent and magnet downloads)tomli(Python <3.11) or built-intomllib(Python ≥3.11)
Install the core dependencies:
pip install requests rich tomliTo enable torrent support you will also need libtorrent:
pip install libtorrentClone and install quickly:
git clone https://github.com/Sr-0w/bwget.git
cd bwget
chmod +x bwget.py
sudo mv bwget.py /usr/local/bin/bwgetOptionally, install the provided man page:
sudo install -Dm644 bwget.1 /usr/share/man/man1/bwget.1- Arch Linux (AUR): bwget
yay -S bwget
or
paru -S bwget- Fedora (COPR): bwget
dnf copr enable srobin/bwget
dnf install bwgetInstall from AUR manually:
git clone https://aur.archlinux.org/bwget.git
cd bwget
makepkg -siSimple file download:
bwget https://example.com/file.tar.gzDownload torrent or magnet link:
bwget https://example.com/file.torrent
bwget "magnet:?xt=urn:btih:..."Force new download (ignore resume):
bwget -c https://example.com/large.isoSHA-256 verification:
bwget --sha256 0123456789abcdef... https://example.com/app.tar.gzUsing an HTTP proxy:
bwget --proxy http://proxy.local:3128 https://example.com/data.zipLimit download rate:
bwget --limit-rate 500 https://example.com/large.isoLimit torrent peers:
bwget --max-seeds 20 https://example.com/file.torrentDisable TLS verification:
bwget --no-check-certificate https://example.com/file.tar.gzBatch download:
bwget -i urls.txtCustom user-agent:
bwget -U "MyDownloader/1.0" https://example.com/file.zipCheck version:
bwget --version| Option | Description |
|---|---|
-o, --output FILE |
Save the download to FILE instead of the remote filename |
-c, --cancel-resume |
Disable resume and start the download from scratch |
-q, --quiet |
Suppress non-error output |
--limit-rate KBPS |
Limit download bandwidth in KiB/s |
-i, --input FILE |
Read URLs from FILE (one per line) |
--sha256 DIGEST |
Verify download against the given SHA-256 digest |
--proxy PROXY_URL |
Use the specified HTTP/HTTPS proxy |
--max-seeds N |
Limit active torrent peers |
-U, --user-agent UA |
Override the User-Agent header |
--no-check-certificate |
Disable TLS certificate verification (insecure) |
--version |
Display version information and exit |
On first launch, bwget creates a default configuration at:
~/.config/bwget/config.toml
Customize settings like proxies, retries, timeouts, chunk sizes, default resume behavior and torrent options directly:
[network]
# proxy = "http://user:pass@yourproxy.example.com:8080"
user_agent = "bwget/0.4.0 (Python/3.x)"
max_retries = 3
base_backoff = 1.0
request_timeout = 15
stream_timeout = 30
# verify TLS certificates (set to false to disable verification)
verify_tls = true
[download]
chunk_size_kb = 256
hash_chunk_size_mb = 1
resume_default = true
bandwidth_limit_kbps = 0
[torrent]
listen_interfaces = "0.0.0.0:6881-6891"
max_seeds = 0Your contributions are welcome! Feel free to open issues, request features, or submit pull requests to help improve bwget.
Crafted with care by Robin Snyders (robin@snyders.xyz)
This project is licensed under the MIT License.