count_promcula/cli.rs
1use clap::Parser;
2use color_eyre::Result;
3
4pub fn parse() -> Result<Cli> {
5 Ok(Cli::parse())
6}
7
8#[derive(Debug, Parser)]
9pub struct Cli {
10 /// Sets bind address
11 #[arg(short, long, default_value = "0.0.0.0")]
12 pub address: String,
13 /// Listening port
14 #[arg(short, long, default_value_t = 3000)]
15 pub port: u16,
16 /// Sets number of seconds to live (indefinite if omitted)
17 pub seconds: Option<u16>,
18}