1pub mod audit;
2pub mod commit;
3pub mod init;
4pub mod protection;
5pub mod repos;
6pub mod rollback;
7pub mod security;
8pub mod settings;
9pub mod tui;
10
11use clap::Parser;
12
13#[derive(Parser)]
14#[command(
15 name = "ward",
16 about = "GitHub repository management for developers. Plan, apply, verify.",
17 version,
18 propagate_version = true
19)]
20pub struct Cli {
21 #[command(subcommand)]
22 pub command: Command,
23
24 #[arg(long, global = true)]
26 pub org: Option<String>,
27
28 #[arg(long, global = true)]
30 pub system: Option<String>,
31
32 #[arg(long, global = true)]
34 pub repo: Option<String>,
35
36 #[arg(long, global = true, default_value_t = false)]
38 pub json: bool,
39
40 #[arg(long, global = true, default_value_t = 5)]
42 pub parallelism: usize,
43
44 #[arg(long, global = true)]
46 pub config: Option<String>,
47
48 #[arg(short, long, global = true, action = clap::ArgAction::Count)]
50 pub verbose: u8,
51}
52
53#[derive(clap::Subcommand)]
54pub enum Command {
55 Repos(repos::ReposCommand),
57
58 Security(security::SecurityCommand),
60
61 Settings(settings::SettingsCommand),
63
64 Commit(commit::CommitCommand),
66
67 Protection(protection::ProtectionCommand),
69
70 Rollback(rollback::RollbackCommand),
72
73 Audit(audit::AuditCommand),
75
76 Tui,
78
79 Init(init::InitCommand),
81
82 #[command(hide = true)]
84 Completions {
85 #[arg(value_enum)]
87 shell: clap_complete::Shell,
88 },
89}