rob thijssen b11a0b7c56 Initial workspace scaffold
Cargo workspace with 5 crates: buh-entity (pure data structs),
buh-data (Turso/libsql data access), buh-util (scraper, rules,
processor, sync modules), buh-cli (binary "buh" with client/daemon
subcommands), and buh-ws (axum WebSocket server).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00
2026-03-20 09:46:15 +02:00

buh

A media automation engine that scrapes torrent indexers, indexes torrents and their metadata, selects interesting downloads using operator-defined rules, queues downloads, processes downloaded files using renaming rules, and syncs renamed files to configured LAN targets.

The end goal is to populate a Jellyfin (or similar) media server with content — shows, movies, music, books, and audio-books — based on ingestion rules, and to later discard content based on operator discard rules.

Architecture

buh-entity          pure data structs (serde only, no logic)
    ↑
buh-data            data access layer (Turso/libsql)
    ↑
buh-util            domain logic (scraper, rules, processor, sync)
    ↑
buh-cli             CLI binary ("buh")
buh-ws              WebSocket server (axum)

All crates live under crates/ in a single Cargo workspace.

Usage

CLI

# interactive client mode (default)
buh

# run daemon routines from config
buh daemon --config /etc/buh/daemon.toml

The client subcommand is assumed when no subcommand is provided.

WebSocket server

cargo run -p buh-ws
# listens on 0.0.0.0:9000, endpoint /ws

Configuration

The daemon reads a TOML configuration file. See daemon.toml for an example.

[database]
url = "libsql://your-db.turso.io"
auth_token = "your-token"

[[indexers]]
name = "example-indexer"
url = "https://example.com/api"
media_types = ["show", "movie"]

[[sync]]
name = "jellyfin-shows"
media_type = "show"
path = "/mnt/media/shows"

[routines]
scrape = true
process = true
sync = true

Building

cargo build --workspace
cargo test --workspace

Requires Rust edition 2024 (stable 1.85+).

License

MIT

Description
media automation engine
Readme 58 KiB
Languages
Rust 100%