1use clap::{Parser as ClapParser, Subcommand as ClapSubcommand};
2
3use crate::utils::logging;
4
5#[allow(missing_docs)]
7#[derive(ClapParser, Debug, Clone)]
8#[command(author, version, about, long_about = None)]
9pub struct Cli {
10 #[clap(
11 short = 'v',
12 long,
13 default_value = "info",
14 help = "Sets the logging verbosity level."
15 )]
16 pub log_level: logging::LogLevel,
17
18 #[clap(subcommand)]
19 pub subcommand: Option<Subcommand>,
20}
21
22#[derive(ClapSubcommand, Clone, Debug)]
24#[allow(missing_docs)]
25pub enum Subcommand {
26 #[clap(name = "packet", about = "Performs packet operations")]
27 Packet(crate::packet::Packet),
28 #[clap(name = "request-enr", about = "Requests an ENR from a node")]
29 RequestEnr(crate::request_enr::RequestEnr),
30 #[clap(name = "server", about = "Runs a discv5 test server")]
31 Server(crate::server::Server),
32}