TUI Dashboard
Real-Time System Monitoring and Management
The OMG interactive terminal dashboard (omg dash) provides a unified view of your system health, package updates, active runtime versions, and recent activity.
π Quick Startβ
omg dash
πΉ Keyboard Controlsβ
| Key | Action |
|---|---|
q | Quit the dashboard |
r | Refresh all data |
Tab | Switch between views |
β/β | Scroll through lists |
Enter | Select/expand item |
? | Show help |
π Dashboard Layoutβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OMG Dashboard [r]efresh [q]uitβ
βββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ€
β System Status β Recent Activity β
β β β
β βββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββββββββββββ β
β β Packages β β β [13:45:30] Install β β β
β β Total: 1,847 β β β firefox, neovim β β
β β Explicit: 423 β β β [13:30:15] Update β β β
β β Orphans: 12 β β β linux, mesa, nvidia-dkms β β
β β β β β [12:00:00] Remove β β β
β β Updates β β β old-package β β
β β Available: 5 βΌ β β β [11:45:22] Sync β β β
β β β β β β β
β β Security β β β β β
β β CVEs: 0 β β β β β β
β β Grade: VERIFIED β β β β β
β βββββββββββββββββββββββββββββββ β βββββββββββββββββββββββββββββββββββββ β
β β β
β Active Runtimes β β
β βββββββββββββββββββββββββββββββ β β
β β β’ node 20.10.0 β β β
β β β’ python 3.12.0 β β β
β β β’ rust 1.75.0 β β β
β β β’ go 1.21.5 β β β
β β β’ bun 1.0.25 β β β
β βββββββββββββββββββββββββββββββ β β
βββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ€
β [q] Quit [r] Refresh [Tab] Switch View [?] Help β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Panel Detailsβ
System Status Panel (Left, 40%)β
Displays core system metrics:
| Metric | Description | Color Coding |
|---|---|---|
| Total | All installed packages | White |
| Explicit | Explicitly installed (not deps) | Cyan |
| Orphans | Unused dependencies | Yellow if > 0 |
| Updates | Available updates | Yellow if > 0, Green if 0 |
| CVEs | Known vulnerabilities | Red if > 0, Green if 0 |
| Grade | Overall security grade | Varies by grade |
Active Runtimes Sectionβ
Shows currently active version for each runtime:
- Node.js β From
.nvmrcorcurrentsymlink - Python β From
.python-versionorcurrentsymlink - Rust β From
rust-toolchain.tomlorcurrentsymlink - Go, Ruby, Java, Bun β From respective version files
Runtimes without an active version are dimmed.
Recent Activity Panel (Right, 60%)β
Shows the last 10 package transactions:
| Field | Format |
|---|---|
| Time | HH:MM:SS |
| Type | Install, Remove, Update, Sync |
| Status | β (success) or β (failure) |
| Packages | First 3 packages, then "..." |
π Data Sourcesβ
System Statusβ
Fetched from daemon via IPC:
let status = client.call(Request::Status { id: 0 }).await?;
Contains:
- Package counts
- Update availability
- Vulnerability counts
- Runtime versions
Transaction Historyβ
Loaded from local history file:
let entries = HistoryManager::new()?.load()?;
self.history = entries.into_iter().rev().take(10).collect();
β±οΈ Auto-Refreshβ
The dashboard automatically refreshes every 10 seconds:
pub async fn tick(&mut self) -> Result<()> {
if self.last_tick.elapsed() >= Duration::from_secs(10) {
self.refresh().await?;
self.last_tick = Instant::now();
}
Ok(())
}
Manual refresh with r key is instant.
π¨ Visual Indicatorsβ
Status Colorsβ
| Color | Meaning |
|---|---|
| π’ Green | Healthy / No issues |
| π‘ Yellow | Warning / Action recommended |
| π΄ Red | Critical / Immediate attention |
| βͺ White | Informational |
| π΅ Cyan | Highlight / Active |
Iconsβ
| Icon | Meaning |
|---|---|
| β | Success |
| β | Failure |
| β’ | List item |
| β² | Increase |
| βΌ | Available |
βοΈ Technical Implementationβ
Technology Stackβ
| Component | Technology |
|---|---|
| TUI Framework | ratatui v0.29 |
| Terminal Backend | crossterm v0.28 |
| Layout | Constraint-based (40%/60%) |
Architectureβ
src/cli/tui/
βββ mod.rs # Entry point, terminal setup, event loop
βββ app.rs # Application state, refresh logic
βββ ui.rs # Layout definitions, widget rendering
Application Stateβ
pub struct App {
pub status: Option<StatusResult>, // System status from daemon
pub history: Vec<Transaction>, // Recent transactions
pub last_tick: std::time::Instant, // For auto-refresh timing
}
Event Loopβ
async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> {
loop {
// Render
terminal.draw(|f| ui::draw(f, app))?;
// Handle input
if event::poll(Duration::from_millis(100))? {
if let Event::Key(key) = event::read()? {
match key.code {
KeyCode::Char('q') => return Ok(()),
KeyCode::Char('r') => app.refresh().await?,
_ => {}
}
}
}
// Auto-refresh
app.tick().await?;
}
}
π± Terminal Requirementsβ
Minimum Requirementsβ
| Requirement | Details |
|---|---|
| Terminal | Any modern terminal (xterm, alacritty, kitty, wezterm) |
| Alternate Screen | Must support alternate screen buffer |
| Colors | 256 colors recommended |
| Unicode | Full Unicode support required |
| Size | Minimum 80x24 characters |
Recommended Setupβ
# Ensure TERM is set correctly
export TERM=xterm-256color
# Use a Nerd Font for icons
# Recommended: JetBrains Mono Nerd Font
π§ Troubleshootingβ
Dashboard Won't Startβ
# 1. Check terminal compatibility
echo $TERM
# Should show xterm-256color or similar
# 2. Check daemon is running
omg status
# If not running:
omg daemon
# 3. Test alternate screen
tput smcup
tput rmcup
Display Issuesβ
| Issue | Solution |
|---|---|
| Garbled characters | Use Unicode-capable font |
| Wrong colors | Set TERM=xterm-256color |
| Layout broken | Resize terminal window |
| Missing icons | Install Nerd Fonts |
Reset Terminalβ
If the terminal is garbled after exit:
reset
# or
stty sane
Data Not Updatingβ
# 1. Manual refresh
# Press 'r' in dashboard
# 2. Check daemon
omg status
# 3. Restart daemon
pkill omgd
omg daemon
π― Best Practicesβ
1. Keep Running in Dedicated Terminalβ
For monitoring, keep the dashboard running in a dedicated terminal pane/tab.
2. Use with tmux/Screenβ
# Create dedicated session
tmux new-session -d -s omg-dash 'omg dash'
# Attach when needed
tmux attach -t omg-dash
3. Combine with Notificationsβ
Use alongside system notifications for critical alerts:
# In a cron job or systemd timer
omg audit scan 2>&1 | grep -q "high_severity" && notify-send "OMG: Security Alert"
π See Alsoβ
- Quick Start β Initial setup
- CLI Reference β All commands
- History & Rollback β Transaction history
- Troubleshooting β Common issues