gbin 0.1.0

A suite of Linux utilities and programs.
use clap::Parser;

use crate::{
    bluetooth::BluetoothTUI,
    cli::{Cli, MainCommands},
};

pub mod bluetooth;
pub mod cli;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let cli = Cli::parse();
    match &cli.command {
        Some(MainCommands::Bluetooth {}) => {
            let mut bt_tui = BluetoothTUI::new();
            let mut terminal = ratatui::init();
            let result = bt_tui.run(&mut terminal).await;
            ratatui::restore();
            result
        }
        None => Ok(()),
    }
}