use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
#[command(propagate_version = true)]
pub struct Cli {
#[arg(short, long, value_name = "QUET")]
pub quiet: bool,
#[arg(short, long, value_name = "PERCENT")]
pub percent: bool,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
Get,
Set(SetArgs),
Inc(SetArgs),
Dec(SetArgs),
Max,
Min,
}
#[derive(Debug, Parser)]
pub struct SetArgs {
#[arg(value_parser = clap::value_parser!(u32).range(0..=100))]
pub percent: u32,
}