1use crate::commands::Commands;
2use clap::Parser;
3const VERSION: &str = env!("CARGO_PKG_VERSION");
4
5#[derive(Parser, Debug)]
7#[command(
8 name = "composer",
9 version = VERSION,
10 long_about = "Composer is a cli tool that empower streamlined cross-platform workflow creation, effortlessly translating configurable files into efficient WebAssembly (Wasm) format for enhanced development and operational efficiency."
11)]
12#[command(disable_version_flag = true)]
13pub struct Cli {
14 #[arg(
15 short,
16 global = true,
17 help = "Print additional information for debugging"
18 )]
19 pub debug: bool,
20
21 #[arg(short, long, global = true, help = "Suppress CLI output")]
22 pub quiet: bool,
23
24 #[command(subcommand)]
25 pub command: Commands,
26
27 #[arg(short = 'v', short_alias = 'V', long, action = clap::builder::ArgAction::Version)]
29 version: (),
30}
31
32impl Cli {
33 pub fn quiet(&self) -> bool {
34 self.quiet
35 }
36}