A CLI tool to interact with aria2c's RPC interface
Project description
Aria2 RPC CLI (a2rpc)
A lightweight Python CLI tool to interact with aria2c's JSON-RPC interface, designed for scripting and automation.
Features ✨
- 📥 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.
☕ Support
If you find this project helpful, consider supporting me:
Installation
Prerequisites
aria2cinstalled (Download aria2)
Via pip
pip install a2rpc
Manual
git clone https://github.com/jet-logic/a2rpc
cd a2rpc
pip install .
Usage
Basic Commands
| 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 |
Advanced: Batch Downloads
- 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
Configuration
Global Flags
| 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"
Examples
1. Download with Custom Options
a2rpc add "https://ubuntu.com/24.04.iso" \
--dir ~/Downloads \
--out ubuntu-latest.iso \
-s "max-connection-per-server=16"
2. Debug Active Downloads
a2rpc list --debug # Shows detailed YAML output
3. Automate with Scripts
import subprocess
subprocess.run(["a2rpc", "add", "magnet:?xt=..."])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
a2rpc-0.0.3.tar.gz
(48.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
a2rpc-0.0.3-py3-none-any.whl
(33.1 kB
view details)
File details
Details for the file a2rpc-0.0.3.tar.gz.
File metadata
- Download URL: a2rpc-0.0.3.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efe669ee4855e09dba28b087178fc159ac867a1ce7c750fd60f922eee3252ed9
|
|
| MD5 |
a7891f7eb3db160c68b46d687f607ac8
|
|
| BLAKE2b-256 |
472e40b57ecb091e8f21b98b13d9bf6021f15da01dfbb36a3c46def922cd1a36
|
File details
Details for the file a2rpc-0.0.3-py3-none-any.whl.
File metadata
- Download URL: a2rpc-0.0.3-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19bf793abcdc8b0c23173121254753405bb62d60a739c9b219f8ba5892f91519
|
|
| MD5 |
cd7faab4a4fbe913c2c631c89b381ac5
|
|
| BLAKE2b-256 |
977120110422653960460f160d6ef3a4af451f3e29f9954573581109f0d9d5e9
|