use std::path::PathBuf; use clap::{Parser, Subcommand}; #[derive(Parser, Debug)] #[command( name = "archlens", about = "Generate architecture diagrams from source code" )] pub struct Cli { #[command(subcommand)] pub command: Option, #[arg(default_value = ".")] pub path: PathBuf, #[arg(long, default_value = "module")] pub level: String, #[arg(long, default_value = "mermaid")] pub format: String, #[arg(long)] pub output: Option, #[arg(long)] pub config: Option, #[arg(long)] pub scope: Option, #[arg(long)] pub exclude: Vec, #[arg(long)] pub include_tests: bool, #[arg(long)] pub no_weights: bool, #[arg(long)] pub watch: bool, #[arg(long, value_name = "REF")] pub since: Option, #[arg(long)] pub split_by_module: bool, #[arg(long)] pub strict: bool, #[arg( long, help = "Check if output matches existing file, exit 1 if different" )] pub check: bool, #[arg(short, long, action = clap::ArgAction::Count)] pub verbose: u8, } #[derive(Subcommand, Debug)] pub enum Command { Init { #[arg(default_value = ".")] path: PathBuf, }, Diff { #[arg(help = "Path to existing diagram file to compare against")] existing: PathBuf, }, }