use clap::{Parser, Subcommand, ValueEnum};
#[derive(Parser)]
#[command(name = "demo", about = "A demo CLI for testing clapdown")]
pub struct Cli {
#[arg(short, long, global = true)]
pub verbose: bool,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
Parse {
file: Option<String>,
#[arg(long)]
check: bool,
},
Format {
path: Vec<String>,
#[arg(long, default_value = "pretty")]
output: OutputFormat,
#[arg(long, default_value = "80")]
line_width: usize,
},
}
#[derive(Copy, Clone, ValueEnum)]
pub enum OutputFormat {
Pretty,
Concise,
Json,
}