1use clap::{Parser, ValueEnum};
2
3#[derive(ValueEnum, Clone, Debug, PartialEq)]
4pub enum CompletionShell {
5 Bash,
6 Elvish,
7 Fish,
8 PowerShell,
9 Zsh,
10 Nushell,
11}
12
13#[derive(Parser, Debug)]
14#[command(
15 name = "retch",
16 version,
17 about = "A fast, feature-rich system information fetcher"
18)]
19pub struct Cli {
20 #[arg(short, long, value_enum, default_value = "long")]
22 pub mode: OutputMode,
23
24 #[arg(short, long)]
26 pub theme: Option<String>,
27
28 #[arg(short, long)]
30 pub config: Option<String>,
31
32 #[arg(long)]
34 pub no_logo: bool,
35
36 #[arg(long)]
38 pub ascii_only: bool,
39
40 #[arg(long)]
42 pub short: bool,
43
44 #[arg(long)]
46 pub long: bool,
47
48 #[arg(long)]
50 pub list_themes: bool,
51
52 #[arg(long)]
54 pub print_theme_template: bool,
55
56 #[arg(long)]
58 pub list_distros: bool,
59
60 #[arg(long)]
62 pub print_logos: bool,
63
64 #[arg(long)]
66 pub generate_config: bool,
67
68 #[arg(long, value_name = "PATH")]
70 pub write_config: Option<Option<String>>,
71
72 #[arg(long)]
74 pub merge_config: bool,
75
76 #[arg(long, value_delimiter = ',')]
78 pub fields: Option<Vec<String>>,
79
80 #[arg(long, value_enum)]
82 pub completions: Option<CompletionShell>,
83}
84
85#[derive(ValueEnum, Clone, Debug, PartialEq)]
86pub enum OutputMode {
87 Short,
88 Long,
89 Custom,
90}