ssh_agency/
cli.rs

1use clap::{Args, Parser};
2
3#[derive(Parser)]
4#[command(author, version, about, long_about = None)]
5pub struct Cli {
6    #[command(flatten)]
7    pub reducers: Reducers,
8
9    #[arg(short, long, help = "Show the currently running agents")]
10    pub show_agents: bool,
11
12    #[arg(
13        short = 'y',
14        long,
15        help = "Ez mode that non-interactively guarantees an agent when exactly 1 or 0 agents are running"
16    )]
17    pub ez: bool,
18
19    #[arg(
20        short,
21        long = "purge",
22        help = "Purge agents that have no identities registered"
23    )]
24    pub purge_empty_agents: bool,
25}
26
27#[derive(Args)]
28#[group(required = false, multiple = false)]
29pub struct Reducers {
30    #[arg(
31        short = 'n',
32        long = "reduce_count",
33        help = "Consolidate to one agent by number of registered identities"
34    )]
35    pub reduce_by_count: bool,
36
37    #[arg(
38        short = 'r',
39        long = "reduce",
40        help = "Consolidate to one agent with no particular method"
41    )]
42    pub reduce_simple: bool,
43}