1mod error;
2mod modules;
3
4use clap::{Parser, Subcommand};
5
6use modules::Modules;
7
8#[derive(Debug, Parser)]
9#[command(version, about, long_about = None)]
10pub struct Cli {
11 #[command(subcommand)]
12 pub command: Command,
13}
14
15#[derive(Debug, Subcommand)]
16pub enum Command {
17 Load {
19 #[command(flatten)]
21 modules: Modules,
22 },
23
24 Unload {
26 #[command(flatten)]
28 modules: Modules,
29 },
30
31 List {
33 #[arg(short('1'), long)]
35 oneline: bool,
36 },
37
38 Schema,
40}
41
42#[cfg(test)]
43mod tests {
44 use super::*;
45 use crate::test_utils::prelude::*;
46
47 #[gtest]
48 fn verify_cli() {
49 use clap::CommandFactory;
50 Cli::command().debug_assert();
51 }
52}