Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ helm.sh
.coverage
coverage.xml
htmlcov/
personal_notes/
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.10.0] - 2026-09-08


### Added
- **Prowlarr Integration**: Full support for Prowlarr indexing alongside Jackett. Helm now natively discovers over 600+ indexers via Prowlarr's `/api/v1/indexer/schema` API.
- **Privacy Display**: Prowlarr indexers in the TUI now clearly display their status as `public`, `private`, or `semi-private` .
- **Tracker Origin Tagging**: JSON output now prefixes trackers with their source (`Jackett (1337x)` vs `Prowlarr (1337x)`) to determine indexer accountability.
- **Interactive Installer Options**: `setup.sh` now prompts users to choose between Jackett, Prowlarr, or both for their core indexer manager.
- **Native Prowlarr Installation**: `setup.sh` now supports downloading and installing Prowlarr directly to `/opt/Prowlarr` and configuring a `systemd` daemon for bare-metal deployments (includes BETA safety warnings).
- **Container Status Command**: Added a new `helm status` (and global `--status` flag) command that natively queries Docker or Podman to list the uptime of all running Helm containers and prints their active Web UI URLs for easy access.
- **Robust Exception Handling**: Implemented a global `KeyboardInterrupt` trap in `cli.py` to prevent ugly stack traces. The ephemeral stack now safely spins down via `teardown_oneshot()` if the user cancels operations prematurely.
- **Network Resiliency**: Added explicit timeouts to all Jackett and Prowlarr API calls in `indexer_manager.py` and `rss_fetcher.py`. ReadTimeouts will no longer hang the app.

### Changed
- **Port Conflict Avoidance**: Migrated Prowlarr's ephemeral docker port from `9696` to `19696` to strictly match Jackett (`19117`) and qBittorrent (`18080`). This guarantees no "Address already in use" errors when running Helm on servers that already have these native apps running.
- **JSON Stdout Sanitization**: The `-j/--json` flag is now guaranteed to return pure, `jq`-parseable JSON. Ephemeral boot logs have been properly redirected to `stderr`.
- **Linting & Code Cleanup**: Cleaned up the repository of temporary patching scripts.
- **Unified Concurrent Lite Pipeline**: The three inline Lite sources (apibay, torrents-csv, Nyaa RSS) now run inside the same bounded worker pool as the search plugins instead of serially before them. Worst-case search latency dropped from a ~75s serial chain of timeouts to a single ~25s bound.
- **Shared HTTP Session**: Lite fetchers and the JSON-API plugins (BitTorrented, EZTV, SubsPlease, YTS) now reuse one connection-pooled `requests.Session` (keep-alive + pool of 32 sockets) via `helm.core.http`, eliminating a fresh TLS handshake per request on multi-page HTML plugins.
- **Single apibay Fetch**: The bundled `piratebay.py` plugin (a duplicate of the inline apibay source) is no longer loaded by the plugin loader, so The Pirate Bay is queried exactly once per search.

### Fixed
- **Lite-Mode fallback crash on empty manager results**: `search_indexers()` referenced a never-implemented `search_all_plugins` import, so any search where Jackett/Prowlarr returned zero results raised `ImportError` (surfacing as a confusing "Indexer Manager not available" message). The async aggregator is now implemented and the fallback silently returns Lite results.
- **Empty piped stdout on exit**: CLI termination paths used `os._exit`, which bypasses Python's stdout flush and produced empty output when `--json` was piped. All exits now use `raise SystemExit(...) from None`, flushing buffered stdout reliably.
- **Prowlarr default indexer seeding actually implemented**: `ProwlarrManager.seed_default_indexers()` now provisions working defaults (1337x, YTS, TorrentGalaxy, NyaaPantsu, EZTV) on first use against Prowlarr's live schema rather than remaining a no-op.


The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@

Helm is a blazing-fast CLI-based torrent automation tool designed to fetch, filter, and send magnet links to qBittorrent.

It completely automates its own setup, orchestrating Jackett, Flaresolverr, and qBittorrent using Docker or Podman under the hood.
It completely automates its own setup, orchestrating Jackett, Prowlarr, Flaresolverr, and qBittorrent using Docker or Podman under the hood.

---

## Features

- **Automated Container Setup:** No more manually configuring Jackett, qBittorrent, or Flaresolverr. `setup.sh` orchestrates everything via Docker/Podman compose.
- **Automated Container Setup:** No more manually configuring Jackett, Prowlarr, qBittorrent, or Flaresolverr. `setup.sh` orchestrates everything via Docker/Podman compose.
- **Ephemeral (One-Shot) Mode:** Containers spin up when you search/download, and tear down immediately after to save RAM and CPU.
- **Permanent Mode:** Keep the stack running 24/7 if you prefer.
- **VPN Support:** Automatically route qBittorrent traffic through Gluetun (Wireguard/OpenVPN).
- **Live Search & Filter:** A fast, interactive CLI interface to search indexers and select torrents.
- **Lite Mode (Zero Setup):** Search and get Magnet links instantly using built-in Python scrapers without needing Docker or Jackett installed!
- **CLI Indexer Management:** Add and remove Jackett indexers directly from the command line.
- **Lite Mode (Zero Setup):** Search and get Magnet links instantly using built-in Python scrapers — no Docker or Jackett needed. All sources (apibay, torrents-csv, Nyaa, and the bundled search plugins) run concurrently over a connection-pooled session, so even a hung index tops out at one socket timeout.
- **CLI Indexer Management:** Manage both Jackett and Prowlarr indexers directly from the command line.

---

Expand Down Expand Up @@ -105,7 +105,7 @@ Honestly for the most part it's for myself and my own usage i wanted to get magn

Helm is actively roaming the 7seas and trying to get more treasures:

- Prowlarr integration (Replacing Jackett).
- ~~Prowlarr integration (Replacing Jackett).~~ Done in 0.10.0 — Jackett, Prowlarr, or both.
- Scrumptious TUI interface.
- Better indexer management.

Expand All @@ -115,7 +115,7 @@ For more detailed tasks breakdown check [TODO.md](docs/TODO.md)

All notable changes are tracked in [CHANGELOG](CHANGELOG.md).

**Latest release: [0.9.5](CHANGELOG.md#095---2026-08-31)** — Major UI improvements including multi-select category checkboxes, inline filtering and sorting, stateful navigation, tracker origins in results, and auto-injection of default Jackett indexers on initialization. See the full file for everything that came before.
**Latest release: [0.10.0](CHANGELOG.md#0100---2026-09-08)** — Full Prowlarr integration with native default-indexer seeding, a new container `status` command, guaranteed-pure `--json` output, and a rewritten Lite pipeline that runs every source concurrently over a shared connection-pooled session. See the full file for everything that came before.

## Configuration

Expand Down Expand Up @@ -191,10 +191,22 @@ Helm pulls torrent RSS feeds from configured indexers, applies filtering and ded

## Credits

Shoutout to the goats! This project is built utilizing these fantastic open-source tools: qBittorrent, Jackett, and Flaresolverr.
Shoutout to the goats! This project is built utilizing these fantastic open-source tools:

(i lwk feel like a sales person pitching these but wtv lol)

- **[qBittorrent](https://www.qbittorrent.org)** — the torrent client that receives all our magnets.
- **[Jackett](https://github.com/Jackett/Jackett)** — the battle-tested indexer manager for public trackers.
- **[Prowlarr](https://github.com/Prowlarr/Prowlarr)** — the modern, community-indexer-powered search indexer manager. Helm natively discovers its 600+ indexer schema alongside Jackett.
- **[Flaresolverr](https://github.com/FlareSolverr/FlareSolverr)** — busts Cloudflare walls so the indexers actually talk to us.
- **[Gluetun](https://github.com/qdm12/gluetun)** — keeps qBittorrent safely behind your VPN with zero config headaches.
- **[LinuxServer.io](https://www.linuxserver.io)** — their massively maintained container images are what the Docker/Podman stack runs on (always coming in clutch istg).

**Lite Mode Plugins:**
A massive thank you to the [qBittorrent search engine plugins community](https://github.com/qbittorrent/search-plugins) and developers. Helm's lightweight search mode natively supports their `.py` plugins, making it possible to search dozens of torrent indexers instantly without any Docker overhead.
A massive thank you to the [qBittorrent search engine plugins community](https://github.com/qbittorrent/search-plugins) and developers. Helm's lightweight search mode natively supports their `.py` plugins, making it possible to search dozens of torrent indexers instantly without any Docker overhead. Bundled and adapted from that community (licensed for adaptation): **BitSearch, EZTV, LimeTorrents, SubsPlease, TorLock, TorrentProject, YTS, 1337x, The Pirate Bay/apibay** — alongside Helm's own **BitTorrented** plugin and the inline **apibay, torrents-csv & Nyaa** feeds.

**Built with these Python libraries:**
**[requests](https://github.com/psf/requests)** (originally Kenneth Reitz), **[beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/)** (Leonard Richardson), **[python-dotenv](https://github.com/theskumar/python-dotenv)** (theskumar), and **[libtorrent](https://github.com/arvidn/libtorrent)** (Arvid Norberg) doing the heavy lifting.

## License

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ services:
- 18191:8191
restart: unless-stopped

mini-helm:
container_name: "${COMPOSE_PROJECT_NAME:-helm}-mini-helm"
cli:
container_name: "${COMPOSE_PROJECT_NAME:-helm}-cli"
image: ghcr.io/piratebird/helm:latest
dns:
- 8.8.8.8
Expand Down
15 changes: 15 additions & 0 deletions docs/BENCHMARK.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,18 @@ While Docker achieves incredible compression on the application memory, you must

#### 3. Verdict
The optimizations we just committed to `setup.sh` are game-changing. By enforcing limits on the containers, your users will actually save *more* memory running Helm via Podman or Docker than they would if they compiled and ran the apps manually on their own host!

---

### Update (September 2026): Full Ephemeral Stack with Prowlarr & Flaresolverr

Following the integration of **Prowlarr** and **Flaresolverr** into the one-shot stack, we re-ran the memory profiling using the exact same constraints.

| Deployment Architecture | qBittorrent | Jackett | Prowlarr | Flaresolverr | CLI Runner (Python) | Total Active Memory |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **Docker** | `~17.2 MB` | `~53.1 MB`| `~67.9 MB`| `~40.2 MB` | `~31.0 MB` | **`~209.4 MB`** |
| **Podman** | `~15.0 MB` | `~47.0 MB`| `~61.0 MB`| `~36.0 MB` | `~31.0 MB` | **`~190.0 MB`** |
| **Native (Lite Mode)** | N/A | N/A | N/A | N/A | `~31.0 MB` | **`~31.0 MB`** |

#### 4. The Ephemeral Advantage
With Prowlarr and Flaresolverr added, a standard daemonized setup would idle at nearly ~200MB 24/7. However, because Helm utilizes the **One-Shot Ephemeral Stack**, this memory is *only* consumed during the exact moment you execute a search and download a torrent. The second you exit the TUI, the containers are spun down (`teardown_oneshot()`), and the stack's memory footprint returns to **0 MB**.
8 changes: 5 additions & 3 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@
- [x] Allow users to search and get Magnet links instantly *without* Docker or Jackett installed.

### 2. Tracker Management
- [ ] **Prowlarr Integration (Optional Mode):**
- [ ] Give users a choice during setup between Jackett and Prowlarr.
- [ ] Implement API handlers for Prowlarr so users who prefer modern tracker syncing can use it seamlessly.
- [x] **Prowlarr Integration (Optional Mode):**
- [x] Give users a choice during setup between Jackett and Prowlarr.
- [x] Implement API handlers for Prowlarr so users who prefer modern tracker syncing can use it seamlessly.
- [x] **Improve Jackett Interaction:**
- [x] Allow adding/removing indexers directly from the CLI.
- [x] Auto-inject default indexers (1337x, YTS, etc.) during `helm init` via internal API.

### 3. Distribution & Installation
- [ ] **Uninstall Script (`uninstall.sh`):**
- [ ] Provide an automated script to cleanly remove Helm containers, networks, volumes, and Python packages based on user choice.
- [x] **Publish to PyPI (`pip install helm-torrent`):**
- [x] Restructure directory to standard Python package layout.
- [x] Implement `helm init` to automatically bootstrap the Docker environment on first run.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "helm-torrent"
version = "0.9.5"
version = "0.10.0"
authors = [
{ name="Piratebird" },
]
Expand Down
Loading
Loading