Skip to main content

TUI — Terminal UI Dashboard

Runix includes an interactive terminal dashboard built with BubbleTea.

Implementation​

Located at internal/tui/:

FileResponsibility
app.goMain BubbleTea model — window management, key handling
components/process_table.goProcess list table view
components/log_view.goLog viewer for selected process
components/status_bar.goBottom status bar
components/help_view.goHelp overlay with keybindings
components/styles.goLipgloss styling constants

Launch​

runix tui

The TUI uses alternate screen buffer and mouse cell motion for full terminal integration.

Interface Layout​

┌──────────────────────────────────────────────────────┐
│ Runix Process Manager v0.1.0 │
├──────┬──────────┬───────────┬─────────┬──────────────┤
│ ID │ NAME │ STATUS │ PID │ UPTIME │
│ 1 │ api │ ● running │ 48291 │ 5m 30s │
│ 2 │ worker │ ● running │ 48292 │ 3m 12s │
│ 3 │ cron │ ○ stopped │ - │ - │
├──────┴──────────┴───────────┴─────────┴──────────────┤
│ Logs: api │
│ 2025-01-15 10:30:00 [out] Server listening on :8080 │
│ 2025-01-15 10:30:01 [out] Connected to database │
│ 2025-01-15 10:30:05 [err] Connection timeout │
│ │
├──────────────────────────────────────────────────────┤
│ q:quit ↑↓:nav r:restart s:stop l:logs ?:help │
└──────────────────────────────────────────────────────┘

Keybindings​

KeyAction
↑ / kMove selection up
↓ / jMove selection down
rRestart selected process
sStop selected process
lToggle log view for selected process
?Show help overlay
qQuit the TUI

Data Sources​

The TUI uses the ProcessLister interface:

type ProcessLister interface {
ListProcesses() ([]types.ProcessInfo, error)
GetProcess(idOrName string) (types.ProcessInfo, error)
}

Two implementations:

ImplementationWhen Used
daemonListerWhen the daemon is running — fetches via IPC
DirectListerWhen no daemon — reads from a local supervisor instance

Components​

Process Table​

Displays a scrollable list of all managed processes with their state, PID, and uptime. The selected process is highlighted.

Log View​

When a process is selected and l is pressed, the lower pane shows recent log output for that process.

Status Bar​

Shows available keybindings at the bottom of the screen.

Help View​

Pressing ? overlays a help panel listing all keybindings.

What's Next​