1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
use anyhow::Result; use clap::Parser; mod app; mod collect; mod insights; mod tabs; mod ui; #[derive(Parser, Debug)] #[command( name = "syswatch", version, about = "Single-host system diagnostics TUI" )] struct Cli { /// Fast-loop tick in milliseconds. #[arg(long, default_value_t = 1000)] tick: u64, /// Start on a specific tab (overview, cpu, memory, disks, fs, procs, gpu, power, services, net, timeline, insights). #[arg(long)] tab: Option<String>, } fn main() -> Result<()> { let cli = Cli::parse(); app::run(app::Options { tick_ms: cli.tick, start_tab: cli.tab, }) }