use clap::{ArgGroup, Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
pub struct Args {
#[command(subcommand)]
pub action: Action,
}
#[derive(Subcommand, Debug)]
pub enum Action {
Install(InstallArgs),
Update(UpdateArgs),
Load,
Clean,
}
#[derive(Parser, Debug)]
pub struct InstallArgs {
#[arg(short, long)]
pub load: bool,
}
#[derive(Parser, Debug)]
#[command(group(
ArgGroup::new("target")
.args(["all", "names"])
.required(true)
))]
pub struct UpdateArgs {
#[arg(short, long)]
pub all: bool,
#[arg(short, long)]
pub load: bool,
pub names: Vec<String>,
}