Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

aioduct download

An aria2-style parallel downloader that splits files into segments and fetches them concurrently using HTTP Range requests.

Basic Usage

# Download with auto-detected filename, 8 parallel segments
aioduct download https://releases.example.com/archive-2.1.tar.gz

# Custom output directory and filename
aioduct download -d ./downloads -o my-archive.tar.gz \
  https://releases.example.com/archive-2.1.tar.gz

# Multiple URIs
aioduct download \
  https://mirror1.example.com/file1.iso \
  https://mirror2.example.com/file2.iso

# Download from a URI list file
aioduct download -i urls.txt -d ./batch-output

Parallelism

# 16 parallel segments per file
aioduct download -s 16 https://cdn.example.com/large-file.bin

# Limit connections per server
aioduct download -x 4 https://cdn.example.com/large-file.bin

# 3 concurrent downloads from a list
aioduct download -j 3 -i urls.txt

# Set minimum segment size (skip splitting small files)
aioduct download -k 10M https://cdn.example.com/large-file.bin

The downloader probes the server for Accept-Ranges support. If the server does not support range requests, it falls back to a single-connection download.

Resume & Integrity

Re-running the same command automatically resumes interrupted downloads. Completed segments are skipped.

# Resume an interrupted download (just re-run)
aioduct download https://slow-server.example.com/10gb-backup.tar.zst

# Disable resume (re-download from scratch)
aioduct download --no-resume https://example.com/file.bin

# Verify checksum after download
aioduct download --checksum sha-256=e3b0c44298fc1c149afbf4c8996fb924... \
  https://releases.example.com/critical-binary

WebDAV Recursive

Download entire directory trees from WebDAV servers. The URL must end with / to trigger directory listing.

# Recursive download of a WebDAV directory
aioduct download -r https://webdav.example.com/shared/project-assets/

# Limit recursion depth
aioduct download -r --max-depth 2 https://webdav.example.com/docs/

Speed Limiting

# Global speed cap across all concurrent downloads
aioduct download --max-overall-download-limit 10M -j 5 -i urls.txt

# Per-download speed cap
aioduct download --max-download-limit 2M https://cdn.example.com/file.bin

Dry Run

Probe URIs without downloading. Reports file size, range support, and output path.

aioduct download --dry-run https://cdn.example.com/huge-dataset.parquet

Progress Display

By default, the downloader shows a ratatui TUI with per-file progress bars, speed, and ETA.

# Plain newline-based progress (no TUI)
aioduct download --plain https://example.com/file.bin

# Suppress all output
aioduct download -q https://example.com/file.bin

# Debug logging to file
aioduct download --log download.log --log-level debug https://example.com/file.bin

Flags Reference

FlagShortDescription
URI...Download URIs (positional, repeatable)
--input-file FILE-iRead URIs from file (one per line)
--dir PATH-dOutput directory (default: .)
--out FILENAME-oOutput filename (single URI only)
--split N-sParallel connections per download (default: 8)
--max-connection-per-server N-xMax connections per server (default: 8)
--max-concurrent-downloads N-jMax concurrent downloads (default: 5)
--min-split-size SIZE-kMinimum segment size (default: 1M)
--piece-size SIZEOverride piece size (auto if unset)
--no-resumeDisable automatic resume
--file-allocation METHODnone, prealloc (default), or falloc
--auto-file-renamingRename output if file exists
--allow-overwriteOverwrite existing files
--checksum TYPE=DIGESTVerify integrity (e.g. sha-256=abc...)
--timeout SECS-tPer-request timeout (default: 60s)
--connect-timeout SECSConnection timeout (default: 30s)
--max-tries N-mMax retry attempts (default: 5)
--retry-wait SECSSeconds between retries (default: 1)
--max-overall-download-limit SIZEGlobal speed cap
--max-download-limit SIZEPer-download speed cap
--header NAME:VALUE-HExtra HTTP header (repeatable)
--referer URLReferer header
--user-agent STRING-UUser-Agent string
--http-user USERHTTP Basic auth username
--http-passwd PASSHTTP Basic auth password
--all-proxy URLProxy for all protocols (http, https, socks4, socks4a, socks5, socks5h)
--check-certificate-falseDisable TLS verification
--recursive-rRecursive WebDAV download
--max-depth NMax recursion depth (default: unlimited)
--dry-runProbe without downloading
--quiet-qSuppress all output
--plainPlain text progress (no TUI)
--human-readableHuman-readable sizes (default: true)
--log FILE-lWrite debug log to file
--log-level LEVELtrace, debug, info, warn, error

Examples

# Batch download with global speed limit and plain progress
aioduct download -j 3 --max-overall-download-limit 20M --plain -i urls.txt

# Mirror a WebDAV directory with auth
aioduct download -r \
  --http-user deploy --http-passwd s3cret \
  https://webdav.example.com/releases/

# CI artifact fetch — fast, limited bandwidth, verified
aioduct download -s 16 \
  --max-download-limit 50M \
  --checksum sha-256=a1b2c3d4... \
  -d ./artifacts \
  https://ci.example.com/builds/latest/output.tar.gz

# Probe multiple files before downloading
aioduct download --dry-run \
  https://cdn.example.com/dataset-part1.parquet \
  https://cdn.example.com/dataset-part2.parquet \
  https://cdn.example.com/dataset-part3.parquet

# Download through SOCKS5 proxy with custom user-agent
aioduct download --all-proxy socks5://127.0.0.1:1080 \
  -U 'aioduct-bot/1.0' \
  https://private.example.com/internal-build.deb