Lightweight Python utilities to manage torrents across Deluge, qBittorrent and rTorrent.
This repository provides a small command-line toolkit (seedbox.py) and client implementations in clients/ to:
- list and summarize torrents
- add/upload
.torrentfiles - export
.torrentfiles (optionally zipped) - move content from fast NVMe storage to spinning Rust
- remove torrents that have seeded long enough, and clean unregistered torrents
The default client is rTorrent, and additional clients implemented are Deluge and qBittorrent.
- Create and activate a Python virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Copy the example config and edit it:
cp cfg/config.example.yaml cfg/seedbox.yaml
# Edit cfg/seedbox.yaml to set host/credentials and paths for your environmentRun the main script with -c/--client to choose a client.
- List torrents (client default:
rtorrent):
python seedbox.py -c deluge -L- Add
.torrentfiles (with optional save path and label/tag):
python seedbox.py -c qbittorrent -A '/path/to/*.torrent' --path '/mnt/downloads/Movies' --label movies-1080p- Export
.torrentfiles (optionally zip exports):
python seedbox.py -c rtorrent -E --export-dir /tmp/exported --zip- Move torrents from NVMe to spinning rust (honors NVMe cache time):
python seedbox.py -c rtorrent -M- Remove torrents that have seeded longer than the configured time:
python seedbox.py -c deluge -R --seed-time 72- Summary table (category counts & sizes):
python seedbox.py -c rtorrent --summary --summary-sort size descCommon flags:
--dry-run: show what would be done without making changes--zip: create a zip archive when exporting torrents--nvme-time/--seed-time: override timings from the config file
See python seedbox.py -h for the full list of flags and commands.
- Default config path:
cfg/seedbox.yaml(the script will use this if-C/--configis not provided). - A sample configuration is provided at
cfg/config.example.yaml— copy it tocfg/seedbox.yamland update credentials, paths, and category seed times.
Key configuration areas:
- global settings:
nvme_dir,rust_dir,nvme_cache_time,minimum_seed_time,export_dir - client sections:
Deluge,qBittorrent,rTorrent(connection info and any client-specific settings)
seedbox.py— main CLI entrypointcfg/— configuration files (config.example.yamlincluded)clients/— client implementations for Deluge, qBittorrent, rTorrent and shared client utilitiesmodels/— configuration dataclasses and helpers
- Logs are written to
logs/seedbox_tools.logrelative to the script directory. - If you see configuration errors, double-check
cfg/seedbox.yamlmatches the keys expected bymodels/config.py.
Contributions are welcome. Open an issue or a pull request with a description of your changes.
This project is provided under the terms in the LICENSE file.