1use clap::{Parser, Subcommand};
6use std::path::PathBuf;
7
8#[derive(Parser, Debug)]
10#[command(author, version, about, long_about = None)]
11pub struct Cli {
12 #[arg(
14 short,
15 long,
16 value_name = "FILE",
17 default_value = "config/monitor.toml",
18 global = true
19 )]
20 pub config: PathBuf,
21
22 #[arg(
24 short,
25 long,
26 value_name = "EXCHANGES",
27 value_delimiter = ',',
28 global = true
29 )]
30 pub exchanges: Option<Vec<String>>,
31
32 #[arg(
34 short,
35 long,
36 value_name = "SYMBOLS",
37 value_delimiter = ',',
38 global = true
39 )]
40 pub symbols: Option<Vec<String>>,
41
42 #[arg(short, long, action = clap::ArgAction::SetTrue, global = true)]
44 pub daemon: bool,
45
46 #[command(subcommand)]
48 pub command: Option<Commands>,
49}
50
51#[derive(Subcommand, Debug)]
53pub enum Commands {
54 Start(StartArgs),
56
57 Config(ConfigArgs),
59
60 Status(StatusArgs),
62}
63
64#[derive(Parser, Debug)]
66pub struct StartArgs {}
67
68#[derive(Subcommand, Debug)]
70pub enum ConfigCommands {
71 Validate,
73 Generate {
75 #[arg(
77 short,
78 long,
79 value_name = "FILE",
80 default_value = "config/monitor.toml"
81 )]
82 output: PathBuf,
83 },
84}
85
86#[derive(Parser, Debug)]
87pub struct ConfigArgs {
88 #[command(subcommand)]
89 pub command: ConfigCommands,
90}
91
92#[derive(Parser, Debug)]
94pub struct StatusArgs {}