use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(
name = "crabscore",
version,
about = "Calculate and inspect CrabScores for Rust projects"
)]
pub struct Cli {
#[arg(short, long, action = clap::ArgAction::Count)]
pub verbose: u8,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand, Debug)]
pub enum Commands {
Score {
#[clap(value_parser, default_value = ".")]
path: String,
#[clap(
long,
value_name = "BIN",
help = "Name (Cargo bin target) or path of executable to benchmark"
)]
bin: Option<String>,
},
Report {
#[arg(long)]
serve: bool,
#[arg(long, default_value_t = 8080)]
port: u16,
},
Version,
}