1mod commands;
4mod format;
5mod parse;
6mod resolve;
7mod run;
8
9pub use commands::*;
10pub use format::*;
11pub use parse::*;
12pub use resolve::*;
13pub use run::run_command;
14
15use clap::{Args, Parser};
16
17#[derive(Debug, Parser)]
19#[command(name = "sonos", about = "Control Sonos speakers", version)]
20pub struct Cli {
21 #[command(subcommand)]
22 pub command: Option<Commands>,
23 #[command(flatten)]
24 pub global: GlobalFlags,
25}
26
27#[derive(Debug, Args)]
29pub struct GlobalFlags {
30 #[arg(long, global = true)]
32 pub speaker: Option<String>,
33 #[arg(long, global = true)]
35 pub group: Option<String>,
36 #[arg(long, short, global = true)]
38 pub quiet: bool,
39 #[arg(short = 'v', long = "verbose", action = clap::ArgAction::Count, global = true)]
41 pub verbose: u8,
42 #[arg(long, global = true)]
44 pub no_input: bool,
45}