use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(name = "tape", version, about = "Atomic per-target dotfile switcher (v2)")]
pub struct Cli {
#[arg(short, long, global = true)]
pub logging: bool,
#[arg(short, long, global = true)]
pub verbose: bool,
#[arg(short, long, global = true)]
pub quiet: bool,
#[command(subcommand)]
pub command: Commands
}
#[derive(Subcommand, Debug)]
pub enum Commands {
Insert {
name: Option<String>,
#[arg(long)]
path: Option<PathBuf>,
#[arg(long)]
dry_run: bool,
#[arg(long)]
no_hooks: bool,
},
Eject {
#[arg(long)]
dry_run: bool,
#[arg(long)]
no_hooks: bool,
},
Status,
Show {
name: Option<String>,
},
Install {
source: String,
#[arg(short, long)]
name: Option<String>,
#[arg(short, long)]
branch: Option<String>,
#[arg(short, long)]
dir: Option<String>,
},
Commit,
}