claude 7c0c55bcea
All checks were successful
release / release (push) Successful in 1m4s
Initial tdarr-cli: Python CLI for the Tdarr API
status/nodes/worker/cruddb/insert/api commands (stdlib only). Cracked
Tdarr's x-api-key auth (seededApiKey), alter-worker-limit and update-node
formats. Used to set up 2-node transcoding (workstation NVENC + Pi5 CPU
fallback). Playbook standard: README (per-OS prereqs), doc/plan.md,
.gitignore (build/ first), VS Code build task, install.sh + one-line curl,
Gitea Actions rolling-latest release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011YPrEZVBpPVoCRyJz2exkZ
2026-07-05 20:31:39 +02:00

tdarr-cli (tdarrctl)

En liten CLI mot Tdarrs API — som npmctl fast för Tdarr. Byggd för att konfigurera/styra Tdarr-servern (bibliotek, flows, noder, worker-gränser) utan att klicka i webb-UI:t. Ren Python (bara stdlib).

Installera

En rad (laddar ner senaste tdarrctl och lägger den i PATH):

curl -fsSL https://gitea.brasse-pc.eu/brasse/tdarr-cli/raw/branch/master/install.sh | sh

Miljövariabler: TDARRCTL_INSTALL_DIR (installkatalog), TDARRCTL_VERSION (release-tag).

Prerequisites (per OS)

Endast Python ≥ 3.8 krävs (inga externa paket — bara standardbiblioteket).

OS Kommando
Garuda/Arch (dev-boxen) sudo pacman -S --needed python
Debian/Ubuntu sudo apt install python3

Konfiguration

  • Bas-URL: TDARR_URL (standard http://192.168.0.19:8266).
  • API-nyckel: TDARR_API_KEY, annars läses apiKey=... ur ~/tdarr-node/.env. Skickas som x-api-key; skrivs aldrig ut.

Kör

python3 tdarrctl.py status                       # server-status/version
python3 tdarrctl.py nodes                        # noder + worker-gränser
python3 tdarrctl.py worker <namn> transcodegpu increase [n]   # ändra workers
python3 tdarrctl.py libraries                    # lista bibliotek
python3 tdarrctl.py cruddb <COLLECTION> <mode> [--obj f.json] [--docID id]
python3 tdarrctl.py insert <COLLECTION> <f.json> [--mode insert|update|removeOne]
python3 tdarrctl.py api <METHOD> <path> [--data f.json|-]      # generiskt

Bygg (till ./build)

VS Code: Run Build Task (Ctrl+Shift+B) → build-tasken lägger en körbar tdarrctl i build/ (gitignoread). Manuellt:

mkdir -p build && install -m 0755 tdarrctl.py build/tdarrctl
./build/tdarrctl status

Test / rök-koll

python3 -m py_compile tdarrctl.py     # syntax
python3 tdarrctl.py status            # når servern?

Mer

  • Plan & designbeslut: doc/plan.md.
  • Fördjupning (API-format, collections, exempel): repots wiki.
Description
smal cli for easy configaration from the terminal
Readme 30 KiB
latest Latest
2026-07-05 20:32:49 +02:00
Languages
Python 84.5%
Shell 15.5%