use clap::Subcommand; #[derive(Subcommand)] pub enum WebCommand { Start { #[arg(short, long, default_value = "11438")] port: u16, #[arg(short, long)] file: Option, }, } pub async fn handle_web_command(cmd: WebCommand) -> anyhow::Result<()> { match cmd { WebCommand::Start { port, file } => { crate::server::run(port, file).await?; } } Ok(()) }