Skip to content
lusorisPublic

About

Snatches missing and cutoff-unmet media across *arr instances while respecting per-instance hourly caps

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

801 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnatchArr — rate-capped missing and cutoff snatching across *arr

Release

HISS-21 Conventional Commits REUSE WCAG 2.2 AA

Licence

Docs Issues Discussions Security policy

Keeps your *arr libraries complete without hammering your indexers.

Rate-capped missing and cutoff-unmet snatching across Sonarr, Radarr, Lidarr, Whisparr and Readarr.

SnatchArr asks Sonarr, Radarr, Lidarr, Whisparr (v2 and v3) and Readarr (legacy) to search for missing items and cutoff-unmet upgrades in small batches. Every search is a snatch: it remembers what it already snatched (the afterglow), never exceeds an instance's hourly stamina, and slows down (foreplay) while your download client is busy, paused or gone. Yes, the name means what you think it means.

Docs: https://lusoris.github.io/SnatchArr/

🏷️ The name

  • Meaning: To snatch is to acquire a missing or cutoff-unmet item, and “Arr” refers to the family of *arr applications (ADR-0020, ADR-0049).
  • Origin: Combines snatch with the *arr suite naming convention from Sonarr and Radarr, following the Huntarr (newtarr) lineage.
  • Double meaning: The innuendo is intended across the pacing vocabulary (snatch, afterglow, stamina, foreplay, quickie) and the anatomical brand mark (ADR-0017).
  • Pronunciation: "snatch-arr" (ADR-0020, ADR-0049).

🎯 Why SnatchArr

Huntarr / newtarr SnatchArr
One setting set per app, shared by all instances A snatch policy per instance
Hourly cap checked once per cycle Stamina debited for granted targets before dispatch in a rolling 60-minute window, shared across workers
Processed items never expire Afterglow with an exponential-backoff TTL per item, separate for missing and upgrades
Looks at the *arr queue size only Watches qBittorrent, Transmission, Deluge, rTorrent, SABnzbd and NZBGet for backpressure
Python, single process, JSON files Go control plane, Rust worker, Postgres, Helm, OpenAPI 3.1
  • Prowlarr indexer awareness: Reads Prowlarr query limits in read-only mode and defers snatches when all automatic-search indexers on an instance are exhausted.
  • Seerr request priority: Syncs approved Seerr requests and searches requested movies and series ahead of the backlog within normal stamina caps.
  • Observe-first queue management: Classifies stalled, slow, failed, import-blocked and unwanted items through the *arr queue API (Queue management), starting every rule in observe mode before any removal or force-import.
  • Deterministic dry-run previews: Evaluates candidate filtering, selection and stamina quotes without dispatching searches or writing afterglow memory (Concepts).

🚀 Get started

Deploy on Kubernetes with the signed OCI Helm chart:

helm install snatcharr oci://ghcr.io/lusoris/charts/snatcharr --namespace snatcharr --create-namespace

The default install needs the CloudNativePG operator. For an external Postgres instead, set postgres.cnpg.enabled=false and point postgres.external.dsnSecretRef at a Secret that holds the DSN. Details, ArgoCD and a kind recipe: Deployment.

For a single Docker host, use the homelab Docker Compose bundle (deploy/homelab/): Install with Docker Compose.

Instances from Configarr

If you already run Configarr, point SnatchArr at its config.yml and secrets.yml and every instance is imported (and kept in sync) instead of being configured twice.

🧩 Architecture at a glance

%%{init: {'theme': 'base', 'themeVariables': {'fontFamily': 'ui-sans-serif, Segoe UI, Helvetica, Arial, sans-serif', 'fontSize': '15px', 'primaryColor': '#141229', 'primaryTextColor': '#f0f1fc', 'primaryBorderColor': '#b295ff', 'lineColor': '#b295ff', 'edgeLabelBackground': '#141229', 'tertiaryColor': '#080717'}}}%%
flowchart TD
  Web["web/ · SvelteKit SPA"]:::input
  API["api/ · Go 1.27 Control Plane"]:::step
  PG[("PostgreSQL / CNPG")]:::store
  Worker["worker/ · Rust snatch-worker"]:::step
  Arr["Sonarr · Radarr · Lidarr<br/>Whisparr · Readarr"]:::ext
  Aux["Prowlarr · Seerr · Configarr<br/>Download Clients"]:::ext
  Web <-->|"OpenAPI 3.1 + SSE"| API
  API <-->|"State, stamina & afterglow"| PG
  Worker -->|"gRPC WorkerService (lease/pull)"| API
  Worker -->|"Batch searches"| Arr
  API -.->|"Read limits & requests"| Aux
  classDef input fill:#080717,stroke:#71c1f7,stroke-width:2px,color:#f0f1fc
  classDef step fill:#141229,stroke:#b295ff,stroke-width:2px,color:#f0f1fc
  classDef store fill:#141229,stroke:#e2a000,stroke-width:2px,color:#f0f1fc
  classDef ext fill:#b295ff,stroke:#080717,stroke-width:2px,color:#080717
Loading

It is a from-scratch, cloud-native rewrite of the Huntarr lineage (newtarr), built on the lusoris stack:

Component Stack
api/ Go 1.27 control plane on golusoris with goenvoy *arr clients, OpenAPI 3.1, RFC 9457, SSE
worker/ Rust snatch-worker (tokio + tonic) that leases snatch runs from the API over gRPC
web/ SvelteKit SPA on sveltesentio, WCAG 2.2 AA / EN 301 549, en + de
deploy/ Distroless OCI images, Helm chart, CloudNativePG, ArgoCD

📚 Guides and reference

Guide What it covers
Concepts Snatches, per-cycle selection, afterglow, stamina, foreplay, circuit breaker, quickies, schedules, dry-run previews, live SSE events
Configuration APP_* and SNATCH_* environment variables, runtime settings, profiles, OIDC and proxy-header SSO, Configarr linked mode
Deployment Signed OCI images, Helm chart, cosign and SLSA verification, CloudNativePG backup/restore and major upgrades, KEDA autoscaling, NetworkPolicy, ArgoCD, kind in incus VM, Docker Compose
Queue management Observe-first strike rules, status-line classifier, ID-matched force-import, and Download clients backpressure
Prowlarr Read-only indexer stamina monitoring and query-limit gate semantics
Seerr Priority snatching for approved requests, request dashboard, and instance import
Readarr (legacy) Frozen legacy Readarr support and tested forks (Bookshelf, Chaptarr, Faustvii Readarr)
API OpenAPI 3.1 HTTP contract, RFC 9457 problem details, authentication, and gRPC WorkerService
Metrics Prometheus endpoints on API and worker, leader-only domain state gauges, ServiceMonitor, PodMonitor, and Grafana dashboard
Roadmap Open version milestones (0.9–0.15 and metadata provider tracks) generated from GitHub milestones
ADRs Architectural Decision Records documenting control/data-plane split, pacing, UI, security, and integrations

🤝 Contribute

Contributions follow the Contributing Guide and the canonical agent operating harness in AGENTS.md:

  • Local setup: make setup installs git hooks and initializes local state; make dev starts Postgres via Docker Compose alongside the API, worker, and web dev servers.
  • Verification gate: Run make verify-all before opening a pull request. Every public interface requires positive, negative, and boundary tests (HISS-15), every route must pass Playwright + axe-core with zero WCAG 2.2 AA violations (make web-e2e), and commit subjects follow Conventional Commits and every commit carries a Signed-off-by line.

💬 Support

📈 Roadmap and releases

Pre-alpha, released: versions and their notes are on the releases page. Open version milestones (0.9 through 0.15 and the Metadata:* tracks) are tracked on the Roadmap (docs/roadmap.md) and GitHub Milestones.

Releases are cut by Release Please (.github/workflows/release-please.yml) and gated by .github/workflows/release.yml on a live cluster MCP dogfood status (snatcharr/dogfood=success, .github/workflows/release-dogfood-gate.yml) and end-to-end amd64/arm64 image smoke checks. Each release publishes ghcr.io/lusoris/snatcharr-api, ghcr.io/lusoris/snatcharr-worker and the chart oci://ghcr.io/lusoris/charts/snatcharr (semver tags only, no latest), all cosign-signed with SLSA build provenance attestations, built in .github/workflows/release-build.yml at SLSA Build Level 3 for every release after v0.2.1; both images come with an SPDX SBOM, and the release page stays a draft until verify confirms every signature, checksum (SHA256SUMS), and provenance bundle (provenance.sigstore.json).

⚖️ Upstream and licence

SnatchArr is a from-scratch, cloud-native rewrite of the Huntarr lineage (newtarr), built on golusoris, goenvoy and sveltesentio.

Code: EUPL-1.2. Documentation: CC BY-SA 4.0. REUSE-compliant.

The brand mark is derived from "Female vulva.svg" by T. Kebert, Wikimedia Commons, CC BY-SA 4.0, modified: cropped to the vulva, clitoral glans enlarged, vaginal opening shaded, recoloured (ADR-0017).

Standards & Governance

Governance: praetor (HISS invariants, canonical AGENTS.md).

HISS Adopted

Praetor manages this repository's declared governance policy. This managed block records adoption state; it is not a verification certificate.

Verification: make verify-all runs the repository's configured verification cascade.

HISS Audit: praetorctl audit enforces policy, generated-surface integrity, and the debt ratchet.

Context Sync: praetorctl compile-context --verify verifies every generated agent context against AGENTS.md.

Debt Baseline: .standards-baseline.json anchors the debt ratchet at 0 recorded infractions; audit forbids growth.

About

Snatches missing and cutoff-unmet media across *arr instances while respecting per-instance hourly caps

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages