1use clap::Parser;
2
3#[derive(Parser, Debug, Clone)]
4pub struct CopyFlags {
5 #[clap(short, long, value_parser, default_value_t = false)]
7 pub watch: bool,
8}
9
10#[derive(Parser, Clone, Debug)]
11pub struct InitFlags {
12 #[clap(short, long, value_parser, default_value_t = false)]
14 pub json: bool,
15
16 #[clap(short, long, value_parser, default_value_t = false)]
18 pub read_env: bool,
19
20 #[clap(long, value_parser)]
22 pub workflows: Option<String>,
23}
24
25#[derive(clap::Subcommand, Clone, Debug)]
26pub enum Action {
27 Clean,
29
30 Init(InitFlags),
32
33 Copy,
35
36 List,
38}
39
40#[derive(Parser, Clone, Debug)]
41#[clap(author, version, about, name = "hawk")]
42pub struct Args {
43 #[clap(short, global = true, long, value_parser, value_hint = clap::ValueHint::FilePath)]
45 pub config: Option<String>,
46
47 #[clap(subcommand)]
48 pub action: Option<Action>,
49
50 #[clap(long, value_parser, global = true)]
53 pub scope: Option<String>,
54
55 #[clap(global = true, short, long, value_parser, default_value_t = false)]
56 pub watch: bool,
57}