use clap::Parser;
use std::process::exit;
mod commands;
#[derive(Parser)]
#[command(version, about, long_about = None)]
pub struct CLI {
#[command(subcommand)]
command: commands::Commands,
}
pub fn run_cli() {
let cli = CLI::parse();
match &cli.command {
commands::Commands::Apply { config } => {
let result = commands::run_apply(&config);
match result {
Ok(_) => println!("Configuration succesfully applied!"),
Err(reason) => {
println!("Error during theme updating:\n{}", reason);
exit(1)
}
}
}
}
}