1 use clap::Parser; 2 3 #[derive(Parser)] 4 #[command(author, version, about, long_about = None)] 5 struct Cli { 6 name: Option<String>, 7 } 8 main()9 fn main() { 10 let cli = Cli::parse(); 11 12 println!("name: {:?}", cli.name.as_deref()); 13 } 14