BetaArchiveDownloader
A high-performance, resilient command-line download manager specifically crafted for BetaArchive and large HTTP/HTTPS archive downloads, built in V (Vlang).
Get BetaArchiveDownloader
Version 1.0.2 · 15 Oct 2026
BetaArchive CLI Download Manager (in V / Vlang)
A high-performance, resilient command-line download manager specifically crafted for BetaArchive and large HTTP/HTTPS archive downloads, built in V (Vlang).
Why this exists
BetaArchive download links often:
- Drop connections mid-download or stall indefinitely without sending bytes.
- Take hours for multi-gigabyte discs (ISOs, ZIPs, RARs).
- Fail with standard tools (
curl, browsers) due to unencoded spaces, custom ports (:81), or expired temporary session tokens. - Cause filename collisions when downloading multiple discs (
Disc01.zip,artwork.zip) without preserving the release folder hierarchy.
This CLI tool solves all of these problems automatically: it reconnects and resumes from the exact byte offset where it left off, loops until finished without manual intervention, and supports batch files.
Key Features
- Automatic HTTP Range Resumption (
Range: bytes=X-): Downloads stream directly to<filename>.part. If disconnected, stalled, or cancelled, it detects the existing byte count and resumes seamlessly. - Zero RAM Bloat (Streaming): Uses chunked disk streaming so downloading 50 GB discs uses only a few megabytes of RAM.
- Automatic Stall Detection & Retries: Detects socket timeouts (stalls) and network disconnects. Automatically reconnects using exponential backoff with jitter.
- Batch Processing (
-f urls.txt): Download a queue of URLs from a plain text file. Supports empty lines and#comments. - Archive Folder Tree Preservation:
Automatically preserves release directory structures (e.g.
(A) Games/PC (Windows)/Game Name/Disc01.zip), automatically stripping redundantDrive X/prefixes (configurable). - Interactive Token Refresh: If a BetaArchive token expires mid-download (HTTP 401/403), the CLI prompts you for the refreshed token and continues immediately from the existing byte offset—without redownloading from zero!
- Bandwidth Throttling (
--limit-rate): Smooth token-bucket rate limiting (e.g.,500K,2M,10M). - Clean Pause & Resume (Ctrl+C): Flushes data cleanly to disk on interrupt. Re-running the command resumes right where it stopped.
- ANSI Progress Bar & Summary: Live terminal progress with percentage, downloaded/total size, dynamic speed, ETA, and a batch summary table.
Quick Start
1. Build the Binary
# Build standalone binary (takes ~8 seconds)
make build
# Or directly with the V compiler
v -o badownload src/
2. Download a Single File
./badownload "https://download.betaarchive.com:81/Drive 1/(A) Games/PC (Windows)/Need for Speed - Pro Street (1.0) (2007) [German] (DVD)/artwork.zip?token=YOUR_TOKEN"
3. Download a Batch of URLs from a File
./badownload -f urls.txt
Batch File Format (urls.txt)
Create a text file (e.g., urls.txt) with one URL per line. Blank lines and lines starting with # are ignored:
# Need for Speed Pro Street
https://download.betaarchive.com:81/Drive 1/(A) Games/PC (Windows)/Need for Speed - Pro Street (1.0) (2007) [German] (DVD)/artwork.zip?token=YOUR_TOKEN
# Sims 3
https://download.betaarchive.com:81/Drive 1/(A) Games/PC (Windows)/Sims 3, The (2009) [English-US] (DVD)/media_dic/Disc01.zip?token=YOUR_TOKEN
https://download.betaarchive.com:81/Drive 1/(A) Games/PC (Windows)/Sims 3, The (2009) [English-US] (DVD)/media_dic/Disc02.zip?token=YOUR_TOKEN
Then run:
./badownload -f urls.txt -o ./my_games
CLI Options
| Flag | Description | Default |
|---|---|---|
-f, --file <file> |
Path to a text file containing URLs (one per line) | "" |
-o, --output-dir <dir> |
Destination directory for downloaded files | ./downloads |
-r, --retries <n> |
Max retries per file before failing (0 = infinite) |
100 |
-t, --timeout <sec> |
Socket stall/read timeout in seconds | 30.0 |
--retry-delay <sec> |
Initial delay before reconnecting after a drop | 3.0 |
--max-retry-delay <sec> |
Maximum backoff delay between retries | 30.0 |
--limit-rate <speed> |
Bandwidth limit (e.g. 500K, 2M, 10M) |
Unlimited |
--update-token <token> |
Override or apply token to all queued URLs | "" |
--flat |
Save all files directly into output dir without subfolders | false |
--no-strip-drive |
Keep leading Drive X/ in directory structure |
false |
--no-prompt |
Non-interactive mode (fail immediately on 401 instead of prompt) | false |
--no-color |
Disable ANSI terminal colors | false |
Examples
Infinite Retries for Flaky Connections
Never stop trying until the file completes:
./badownload -f urls.txt -r 0
Apply a Fresh Token to All URLs
If you copied URLs with expired or placeholder tokens:
./badownload -f urls.txt --update-token abc123def456
Rate-Limit Bandwidth to 2 MB/s
./badownload -f urls.txt --limit-rate 2M
Save All Files Flat in One Directory
./badownload -f urls.txt --flat -o ./all_discs
Running Tests
Run the built-in test suite:
make test
# or
v -enable-globals test src/