ferrous_forge/
cli.rs

1//! Command Line Interface for Ferrous Forge
2//!
3//! This module defines the CLI structure and argument parsing using clap.
4
5use clap::Parser;
6
7/// Ferrous Forge - The Type-Safe Rust Development Standards Enforcer
8#[derive(Parser)]
9#[command(author, version, about, long_about = None)]
10#[command(propagate_version = true)]
11pub struct Cli {
12    /// The command to execute
13    #[command(subcommand)]
14    pub command: crate::commands::Commands,
15
16    /// Enable verbose output
17    #[arg(short, long, global = true)]
18    pub verbose: bool,
19
20    /// Output format
21    #[arg(long, value_enum, default_value_t = OutputFormat::Human, global = true)]
22    pub format: OutputFormat,
23
24    /// Configuration file path
25    #[arg(short, long, global = true)]
26    pub config: Option<std::path::PathBuf>,
27}
28
29/// Output format options
30#[derive(clap::ValueEnum, Clone, Debug)]
31pub enum OutputFormat {
32    /// Human-readable output
33    Human,
34    /// JSON output
35    Json,
36    /// YAML output  
37    Yaml,
38}