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 = 'v', long = "verbose", global = true)]
17 pub verbose: bool,
18}
19
20#[derive(Subcommand, Debug, Clone)]
22pub enum Command {
23 Check(CheckArgs),
25 Init(InitArgs),
27 Baseline(BaselineArgs),
29}
30
31#[derive(Args, Debug, Clone)]
33pub struct CheckArgs {
34 #[arg(value_name = "PATH", allow_hyphen_values = true)]
36 pub paths: Vec<PathBuf>,
37
38 #[arg(long = "no-cache")]
40 pub no_cache: bool,
41}
42
43#[derive(Args, Debug, Clone)]
45pub struct InitArgs {}
46
47#[derive(Args, Debug, Clone)]
49pub struct BaselineArgs {
50 #[arg(long = "threshold")]
52 pub threshold: Option<usize>,
53
54 #[arg(long = "allow-growth")]
56 pub allow_growth: bool,
57}