1use std::path::PathBuf;
4
5use clap::{Args, Parser, Subcommand};
6
7#[derive(Parser, Debug)]
9#[command(name = "loq", version, about = "Enforce file size constraints")]
10pub struct Cli {
11 #[command(subcommand)]
13 pub command: Option<Command>,
14
15 #[arg(short = 'q', long = "quiet", global = true)]
17 pub quiet: bool,
18
19 #[arg(long = "silent", global = true)]
21 pub silent: bool,
22
23 #[arg(short = 'v', long = "verbose", global = true)]
25 pub verbose: bool,
26
27 #[arg(long = "config", value_name = "PATH", global = true)]
29 pub config: Option<PathBuf>,
30}
31
32#[derive(Subcommand, Debug, Clone)]
34pub enum Command {
35 Check(CheckArgs),
37 Init(InitArgs),
39}
40
41#[derive(Args, Debug, Clone)]
43pub struct CheckArgs {
44 #[arg(value_name = "PATH", allow_hyphen_values = true)]
46 pub paths: Vec<PathBuf>,
47}
48
49#[derive(Args, Debug, Clone)]
51pub struct InitArgs {
52 #[arg(long = "baseline")]
54 pub baseline: bool,
55}