use clap::{Parser, Subcommand};
use dotfiles::Dotfiles;
mod dotfiles;
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct Cli {
#[command(subcommand)]
command: Option<Commands>,
}
#[derive(Subcommand)]
enum Commands {
Init,
Collect,
Restore,
}
fn main() {
let cli = Cli::parse();
match &cli.command {
Some(Commands::Init) => {
Dotfiles::new();
}
Some(Commands::Collect) => {
Dotfiles::collect().unwrap();
}
Some(Commands::Restore) => {
Dotfiles::restore().unwrap();
}
None => {}
}
}