1use clap::Parser;
2use std::path::PathBuf;
3
4#[derive(Parser, Debug)]
5#[command(
6 name = "repo-analyzer",
7 about = "A tool to analyze GitHub repositories",
8 version,
9 author
10)]
11pub struct Cli {
12 #[arg(short, long, required_unless_present = "remote_url")]
14 pub repo_path: Option<PathBuf>,
15
16 #[arg(short = 'f', long, default_value = "html")]
18 pub output_format: String,
19
20 #[arg(short, long)]
22 pub output: Option<String>,
23
24 #[arg(short, long, default_value = "false")]
26 pub detailed_history: bool,
27
28 #[arg(short, long, default_value = "5")]
30 pub top_contributors: usize,
31
32 #[arg(short = 'u', long)]
34 pub remote_url: Option<String>,
35
36 #[arg(long, default_value = "0")]
38 pub history_depth: usize,
39
40 #[arg(short = 'U', long)]
42 pub upload: bool,
43}