diff --git a/src/cli.rs b/src/cli.rs index 7c21c1da..222c1865 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -50,9 +50,17 @@ pub enum Commands { json: bool, /// Show detailed analysis information (legacy format) - #[arg(short, long, conflicts_with = "display")] + #[arg(short, long, conflicts_with_all = ["display", "summary", "matrix"])] detailed: bool, + /// Show summary analysis information + #[arg(short, long, conflicts_with_all = ["display", "detailed", "matrix"])] + summary: bool, + + /// Show matrix/dashboard analysis information + #[arg(short = 'M', long, conflicts_with_all = ["display", "detailed", "summary"])] + matrix: bool, + /// Display format for analysis results #[arg(long, value_enum, default_value = "matrix")] display: Option, diff --git a/src/handlers/analyze.rs b/src/handlers/analyze.rs index cc32bd61..c847e7b1 100644 --- a/src/handlers/analyze.rs +++ b/src/handlers/analyze.rs @@ -11,6 +11,8 @@ pub fn handle_analyze( path: std::path::PathBuf, json: bool, detailed: bool, + summary: bool, + matrix: bool, display: Option, _only: Option>, color_scheme: Option, @@ -39,10 +41,14 @@ pub fn handle_analyze( let output = if json { display_analysis_with_return(&monorepo_analysis, DisplayMode::Json) } else { - // Determine display mode + // Determine display mode from flags (standalone flags take precedence over --display) let mode = if detailed { // Legacy flag for backward compatibility DisplayMode::Detailed + } else if summary { + DisplayMode::Summary + } else if matrix { + DisplayMode::Matrix } else { match display { Some(DisplayFormat::Matrix) | None => DisplayMode::Matrix, diff --git a/src/lib.rs b/src/lib.rs index 790ecf96..5c8e4945 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,11 +33,13 @@ pub async fn run_command( path, json, detailed, + summary, + matrix, display, only, color_scheme, } => { - match handlers::handle_analyze(path, json, detailed, display, only, color_scheme) { + match handlers::handle_analyze(path, json, detailed, summary, matrix, display, only, color_scheme) { Ok(_output) => Ok(()), // The output was already printed by display_analysis_with_return Err(e) => Err(e), } diff --git a/src/main.rs b/src/main.rs index e4304a7a..0a4b975e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,6 +130,8 @@ async fn run() -> syncable_cli::Result<()> { path, json, detailed, + summary, + matrix, display, only, color_scheme, @@ -139,6 +141,10 @@ async fn run() -> syncable_cli::Result<()> { "json" } else if detailed { "detailed" + } else if summary { + "summary" + } else if matrix { + "matrix" } else { match display { Some(DisplayFormat::Matrix) | None => "matrix", @@ -169,7 +175,7 @@ async fn run() -> syncable_cli::Result<()> { telemetry_client.track_analyze_folder(properties); } - match handle_analyze(path, json, detailed, display, only, color_scheme) { + match handle_analyze(path, json, detailed, summary, matrix, display, only, color_scheme) { Ok(_output) => Ok(()), // The output was already printed by display_analysis_with_return Err(e) => Err(e), } @@ -1548,6 +1554,8 @@ pub fn handle_analyze( path: std::path::PathBuf, json: bool, detailed: bool, + summary: bool, + matrix: bool, display: Option, only: Option>, color_scheme: Option, @@ -1557,6 +1565,8 @@ pub fn handle_analyze( path, json, detailed, + summary, + matrix, display, only, color_scheme,