use clap::{Parser, Subcommand};
#[derive(Debug, Clone, Parser)]
#[clap(name = env!("CARGO_PKG_NAME"), version = env!("CARGO_PKG_VERSION"), author = env!("CARGO_PKG_AUTHORS"), about = env!("CARGO_PKG_DESCRIPTION"), infer_subcommands = true)]
pub struct Args {
#[clap(subcommand)]
pub subcommand: Operation,
#[clap(short, long, default_value = "default", global = true)]
pub profile: String,
}
#[derive(Debug, Clone, Subcommand)]
pub enum Operation {
#[clap(subcommand)]
Profile(ProfileCommands),
#[clap(name = "parse")]
Parse(ParseArgs),
}
#[derive(Debug, Clone, Subcommand)]
pub enum ProfileCommands {
#[clap(name = "new")]
New {
#[clap(default_value = "default")]
profile: String,
},
#[clap(name = "delete")]
Delete {
#[clap(required = true)]
profile: String,
},
}
#[derive(Debug, Clone, Parser)]
pub struct ParseArgs {
#[clap(name = "service", required = true)]
pub services: Vec<String>,
}