# Control Rutorrent

> Control ruTorrent/rTorrent via HTTPRPC. List torrents, inspect files/peers/trackers, add torrents from URL or magnet links, run lifecycle actions (start/stop/pause/unpause/recheck/remove), or read global transfer statistics.

- Skill: `wei/control-rutorrent` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add wei/control-rutorrent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wei/control-rutorrent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: wei (https://skillmd.com/u/wei)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wei/control-rutorrent

---


# ruTorrent HTTPRPC

Use `scripts/rutorrent_client.py` to call ruTorrent HTTPRPC endpoints.

## Prepare Connection

1. Verify that the ruTorrent `httprpc` plugin is installed and enabled.
2. Export connection variables:
   - `RUTORRENT_URL`
   - `RUTORRENT_USER` (Optional)
   - `RUTORRENT_PASS` (Optional)
3. Run commands with `python scripts/rutorrent_client.py <command>`.

## CLI Examples

```bash
python scripts/rutorrent_client.py list
python scripts/rutorrent_client.py add "magnet:?xt=..."
python scripts/rutorrent_client.py start <hash>
python scripts/rutorrent_client.py stop <hash>
python scripts/rutorrent_client.py remove <hash>
python scripts/rutorrent_client.py global-stats
```

## Library Usage

```python
from scripts.rutorrent_client import RuTorrentHttprpcClient

c = RuTorrentHttprpcClient("https://host/rutorrent", "user", "pass")
torrents = c.list_torrents()
c.start("INFO_HASH")
```

