1use clap::{Parser, Subcommand};
2
3#[derive(Parser)]
4#[command(name = "wow-alchemy")]
5#[command(about = "Command-line tools for World of Warcraft file formats", long_about = None)]
6#[command(version)]
7#[command(author)]
8pub struct Cli {
9 #[command(subcommand)]
10 pub command: Commands,
11
12 #[arg(short, long, action = clap::ArgAction::Count, global = true)]
13 pub verbose: u8,
14
15 #[arg(short, long, global = true)]
16 pub quiet: bool,
17}
18
19#[derive(Subcommand)]
20pub enum Commands {
21 #[cfg(feature = "dbc")]
22 Dbc {
23 #[command(subcommand)]
24 command: crate::commands::dbc::DbcCommands,
25 },
26
27 #[cfg(feature = "blp")]
28 Blp {
29 #[command(subcommand)]
30 command: crate::commands::blp::BlpCommands,
31 },
32
33 #[cfg(feature = "m2")]
34 M2 {
35 #[command(subcommand)]
36 command: crate::commands::m2::M2Commands,
37 },
38
39 #[cfg(feature = "wmo")]
40 Wmo {
41 #[command(subcommand)]
42 command: crate::commands::wmo::WmoCommands,
43 },
44
45 #[cfg(feature = "adt")]
46 Adt {
47 #[command(subcommand)]
48 command: crate::commands::adt::AdtCommands,
49 },
50
51 #[cfg(feature = "wdt")]
52 Wdt {
53 #[command(subcommand)]
54 command: crate::commands::wdt::WdtCommands,
55 },
56
57 #[cfg(feature = "wdl")]
58 Wdl {
59 #[command(subcommand)]
60 command: crate::commands::wdl::WdlCommands,
61 },
62
63 Completions {
64 #[arg(value_enum)]
65 shell: clap_complete::Shell,
66 },
67}