All checks were successful
release / release (push) Successful in 1m4s
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
2.0 KiB
2.0 KiB
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(standardhttp://192.168.0.19:8266). - API-nyckel:
TDARR_API_KEY, annars läsesapiKey=...ur~/tdarr-node/.env. Skickas somx-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.