nettop 0.1.1

CLI network usage monitor by application — like NetLimiter for the terminal
mod app;
mod args;
mod collector;
mod procnet;
mod types;
mod ui;

use anyhow::Result;
use args::Args;
use clap::Parser;
use clap_version_flag::colorful_version;

fn main() -> Result<()> {
    let os_args: Vec<String> = std::env::args().collect();
    if os_args.len() == 2 && (os_args[1] == "-V" || os_args[1] == "--version") {
        let version = colorful_version!();
        version.print_and_exit();
    }

    let args = Args::parse();
    app::run(args)
}