A lightweight Python CLI tool to interact with aria2c's JSON-RPC interface, designed for scripting and automation.
- 📥 Download Management
Add, pause, resume, or remove downloads via HTTP, Magnet, or torrent links. - 🖥️ Server Control
Start/shutdownaria2cRPC server with custom ports and directories. - 📋 Batch Processing
Queue multiple downloads from input files with per-URL options. - 📊 Real-Time Monitoring
List active/waiting/stopped downloads with debug-friendly output. - 🔒 Secure
Supports RPC secret tokens for authenticated access.
If you find this project helpful, consider supporting me:
aria2cinstalled (Download aria2)
pip install a2rpcgit clone https://github.com/jet-logic/a2rpc
cd a2rpc
pip install .| Command | Description | Example |
|---|---|---|
a2rpc start |
Start RPC server | a2rpc start --port 6800 |
a2rpc add <URI> |
Add a download | a2rpc add "magnet:?xt=..." -d ~/dl |
a2rpc list |
List downloads | a2rpc list --debug |
a2rpc pause <GID> |
Pause a download | a2rpc pause abc123 |
a2rpc shutdown |
Shutdown server | a2rpc shutdown --force |
- Create an input file (
downloads.txt):https://example.com/file1.iso dir=/mnt/downloads https://example.com/file2.zip out=backup.zip - Run:
a2rpc input downloads.txt
| Flag | Description | Default |
|---|---|---|
--rpc-url |
RPC server URL | http://localhost:6800/jsonrpc |
--rpc-secret |
Authentication token | None |
Example:
a2rpc --rpc-secret mytoken add "https://example.com/large-file.mp4"a2rpc add "https://ubuntu.com/24.04.iso" \
--dir ~/Downloads \
--out ubuntu-latest.iso \
-s "max-connection-per-server=16"a2rpc list --debug # Shows detailed YAML outputimport subprocess
subprocess.run(["a2rpc", "add", "magnet:?xt=..."])