mod anomalies;
mod app;
mod banner;
mod budget;
mod fonts;
mod forecast;
mod format;
mod glyph;
mod meter;
mod overview;
mod providers;
mod refresh;
mod severity;
mod tabs;
mod tray;
use anyhow::Result;
fn main() -> Result<()> {
let mut args = std::env::args().skip(1);
if let Some(arg) = args.next() {
match arg.as_str() {
"--version" | "-V" => {
println!("costroid-bar {}", env!("CARGO_PKG_VERSION"));
return Ok(());
}
"--help" | "-h" => {
print_help();
return Ok(());
}
"--self-check" => {
return app::self_check();
}
other => {
eprintln!("costroid-bar: unrecognized argument '{other}'. Try --help.");
std::process::exit(2);
}
}
}
app::run()
}
fn print_help() {
println!(
"costroid-bar — the Costroid taskbar (tray glance + live cockpit).\n\n\
USAGE:\n costroid-bar [--version] [--help] [--self-check]\n\n\
--self-check runs a one-shot, no-GUI local-data pass (collect + render models) and\n\
exits — used by the offline-acceptance proof. Run with no arguments to launch the\n\
tray + window. Quotas, spend, and alerts\n\
come from local data via costroid-core — no network, no telemetry. Connect and\n\
reconcile stay in the `costroid` CLI; deep analysis (trends / models / history /\n\
frontier) lives there too."
);
}