The Monitor tick ran smartctl against every physical disk every 5 seconds, regardless of which tab was visible — and smartctl's default behaviour is to spin up a drive in standby to read its attributes. Net effect: drives could never spin down and ran (hot) 24/7 while the TUI was open. Three fixes: - smartctl now runs with -n standby: a sleeping drive is never woken for a health probe. It's reported as a new Standby state and shown as "asleep" in the SMART table — a good sign, not a missing reading. - Health probes only run while the Monitor tab is visible. The tick always re-arms, but Setup/Manage now cost zero disk activity. Switching to Monitor (or pressing r on it) fires an immediate refresh so the snapshot is never stale. - SMART moved to its own 60s cadence. The 5s tick keeps the cheap probes (statfs, /proc, systemd); disk rows are cached between SMART probes so the table doesn't flicker. lastSmart is stamped at issue time so a slow USB bridge can't double up probes. Verified on moviebox (3x 10TB spinning drives) with a counting shim around smartctl: 0 calls while on Setup, immediate probe on entering Monitor, then exactly one batch per 60s. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| cmd/tuistream | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
TUISTREAM (tuistream)
A terminal UI for setting up and running a headless Jellyfin media server on Arch / Omarchy — over SSH, with no desktop environment. It installs Jellyfin, attaches and mounts media drives (single disks or btrfs RAID pools), opens the firewall, and shows a live health monitor, all without dropping you to a shell or switching terminals mid-task.
TUISTREAM is an independent setup/management tool for Jellyfin. It is not affiliated with the Jellyfin project; "Jellyfin" is used here descriptively.
Features
- Setup — install / uninstall Jellyfin, open or close the firewall ports, copy the server's web address to your clipboard (works over SSH + tmux), and move Jellyfin's library storage onto a media drive.
- Add media drive — attach a spare disk or partition: keep its existing
filesystem or format it (btrfs / ext4 / xfs), or combine 2+ disks into a
btrfs RAID pool (1 / 0 / 5 / 10). The boot drive is never offered — the
classifier follows every candidate down through LUKS / LVM / RAID to its
physical disk and refuses anything hosting
/,/boot, or swap. - Import an existing btrfs pool — re-attach a multi-device pool from a previous setup non-destructively (mounts it as-is; never formats).
- Safe with existing media — keeping a filesystem previews what's on it, skips creating starter folders when it already has content, and grants Jellyfin read access recursively so existing media is actually visible to the scanner.
- Manage — copy media in from an external drive (with a file picker), mount / eject drives, and rename or delete files, each behind a confirmation.
- Monitor — per-core CPU, load / memory / uptime, per-mount capacity, btrfs pool error counters, and per-disk SMART health — for a box you only reach over SSH.
- Single static binary; missing tools (btrfs-progs, xfsprogs, acl, …) are installed on first launch.
Install
One line, nothing to clone:
curl -fsSL https://raw.githubusercontent.com/28allday/TUISTREAM/main/install.sh | bash
This installs the right binary for your architecture into /usr/local/bin
(using sudo if needed) so both tuistream and sudo tuistream resolve. Pin a
version with TUISTREAM_VERSION=v0.1.0, or change the prefix with PREFIX=/opt.
TUISTREAM installs to a system path on purpose: it's a root-by-design tool
(installs Jellyfin, edits /etc/fstab, mounts drives), so it must be on the sudo
secure_path — ~/.local/bin is not.
Usage
sudo tuistream # full TUI
tuistream --read-only # inventory views only, no root, no actions
Run with sudo, it acts on behalf of the real user behind the sudo invocation
($SUDO_USER): media drives mount under /media/<user>/ and its Omarchy theme
is used. tab / shift+tab switch tabs, r refreshes, q quits; each tab
shows its key bar at the bottom.
Getting started
A first-run, from an empty box to a working server — all from the Setup tab
(sudo tuistream):
- Install Jellyfin — press
iand confirm. TUISTREAM pulls Jellyfin from the official Arch repo and starts the service. - Attach storage for your media:
- A spare disk → press
a(add drive), pick it, choose Keep existing filesystem or format it, and name it. It mounts at/media/<user>/<name>. - A multi-disk btrfs pool from a previous setup → press
p(import pool) to re-attach it untouched. (ponly shows when such a pool is present.) - On a fresh drive, TUISTREAM seeds library folders for you under
<mount>/JellyfinMedia/:Movies,Shows,Music,Books,Home Videos,Music Videos. Copy your media into these (the Manage tab'sccan copy in from an external drive).
- A spare disk → press
- Open the firewall — press
fso other devices on your LAN can reach the server (ports8096/tcpweb UI and7359/udpdiscovery). - Open the web UI — press
yto copy the server's address (http://<host>:8096) to your clipboard, even over SSH, then open it in a browser on any LAN device. - Create your libraries in Jellyfin — in the web UI's first-run wizard, add
a library for each type and point it at the matching folder under
/media/<user>/<name>/JellyfinMedia/(e.g. Movies →…/JellyfinMedia/Movies). The folder names already match Jellyfin's content types.
Optional: press j to move Jellyfin's own library database and metadata off the
OS drive onto a media drive (handy on a small boot SSD).
Build from source
Needs Go 1.26+.
git clone https://github.com/28allday/TUISTREAM
cd TUISTREAM
./install.sh # builds, then installs to /usr/local/bin
License
MIT — see LICENSE. TUISTREAM runs Jellyfin (GPL-2.0) as a separate process; it does not bundle or link it. The terminal UI is built on the Charm libraries (MIT).