use clap::Parser;
#[derive(Parser, Debug, Default)]
#[command(name = "commitbee")]
#[command(version)]
#[command(about = "AI-powered commit message generator", long_about = None)]
pub struct Cli {
#[arg(short, long, env = "COMMITBEE_PROVIDER")]
pub provider: Option<String>,
#[arg(short, long, env = "COMMITBEE_MODEL")]
pub model: Option<String>,
#[arg(short = 'y', long)]
pub yes: bool,
#[arg(long)]
pub dry_run: bool,
#[arg(long)]
pub allow_secrets: bool,
#[arg(short = 'n', long, default_value_t = 1, value_parser = clap::value_parser!(u8).range(1..=5))]
pub generate: u8,
#[arg(long)]
pub show_prompt: bool,
#[arg(long)]
pub no_split: bool,
#[arg(long)]
pub no_scope: bool,
#[arg(long)]
pub clipboard: bool,
#[arg(long = "exclude", value_name = "GLOB")]
pub exclude: Vec<String>,
#[arg(long)]
pub locale: Option<String>,
#[arg(short, long)]
pub verbose: bool,
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(clap::Subcommand, Debug)]
pub enum HookAction {
Install,
Uninstall,
Status,
}
#[derive(clap::Subcommand, Debug)]
pub enum Commands {
Init,
Config,
Doctor,
Completions {
#[arg(value_enum)]
shell: clap_complete::Shell,
},
Hook {
#[command(subcommand)]
action: HookAction,
},
#[cfg(feature = "secure-storage")]
SetKey {
provider: String,
},
#[cfg(feature = "secure-storage")]
GetKey {
provider: String,
},
#[cfg(feature = "eval")]
Eval {
#[arg(long, default_value = "tests/fixtures/eval")]
fixtures_dir: std::path::PathBuf,
#[arg(long)]
filter: Option<String>,
},
}