ferrous_forge/commands/
mod.rs

1//! Command implementations for Ferrous Forge
2
3use clap::Subcommand;
4
5/// Available commands for Ferrous Forge
6#[derive(Subcommand)]
7pub enum Commands {
8    /// Initialize Ferrous Forge system-wide
9    Init {
10        /// Force initialization even if already configured
11        #[arg(short, long)]
12        force: bool,
13    },
14    /// Show status of Ferrous Forge installation and configuration
15    Status,
16    /// Update Ferrous Forge to the latest version
17    Update {
18        /// Update channel to use (stable, beta, nightly)
19        #[arg(short, long, default_value = "stable")]
20        channel: String,
21        /// Only update rules, not the binary
22        #[arg(short, long)]
23        rules_only: bool,
24        /// Show what would be updated without actually updating
25        #[arg(short, long)]
26        dry_run: bool,
27    },
28    /// Manage configuration settings
29    Config {
30        /// Set a configuration value (key=value)
31        #[arg(short, long)]
32        set: Option<String>,
33        /// Get a configuration value
34        #[arg(short, long)]
35        get: Option<String>,
36        /// List all configuration values
37        #[arg(short, long)]
38        list: bool,
39        /// Reset configuration to defaults
40        #[arg(short, long)]
41        reset: bool,
42    },
43    /// Validate a Rust project against standards
44    Validate {
45        /// Path to the project to validate (defaults to current directory)
46        path: Option<std::path::PathBuf>,
47    },
48    /// Rollback to a previous version
49    Rollback {
50        /// Version to rollback to
51        version: String,
52    },
53    /// Uninstall Ferrous Forge from the system
54    Uninstall {
55        /// Confirm uninstallation without prompting
56        #[arg(short, long)]
57        confirm: bool,
58    },
59}
60
61pub mod config;
62pub mod init;
63pub mod rollback;
64pub mod status;
65pub mod uninstall;
66pub mod update;
67pub mod validate;