use camino::Utf8PathBuf;
use clap::{Args, Subcommand, ValueEnum};
#[derive(Debug, Args)]
pub struct DevshellArgs {
#[command(subcommand)]
pub action: DevshellAction,
}
#[derive(Debug, Subcommand)]
pub enum DevshellAction {
Status(StatusArgs),
Add(AddArgs),
Clean(CleanArgs),
Sync(SyncArgs),
}
#[derive(Debug, Args)]
pub struct StatusArgs {
#[arg(long, default_value = ".")]
pub target: Utf8PathBuf,
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Args)]
pub struct AddArgs {
#[arg(long, default_value = ".")]
pub target: Utf8PathBuf,
#[arg(long)]
pub tag: Option<String>,
#[arg(long)]
pub apply: bool,
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Args)]
pub struct CleanArgs {
#[arg(long, default_value = ".")]
pub target: Utf8PathBuf,
#[arg(long, value_name = "PATH")]
pub also: Vec<Utf8PathBuf>,
#[arg(long)]
pub apply: bool,
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Args)]
pub struct SyncArgs {
#[arg(long, default_value = ".")]
pub target: Utf8PathBuf,
#[arg(long)]
pub tag: Option<String>,
#[arg(long, value_enum, default_value_t = Caller::Envrc)]
pub caller: Caller,
#[arg(long)]
pub apply: bool,
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
#[value(rename_all = "kebab-case")]
pub enum Caller {
Envrc,
Operator,
}