use clap::{Parser, Subcommand}; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] pub(crate) struct Args { #[command(subcommand)] pub(crate) command: Commands, } #[derive(Subcommand, Debug)] pub(crate) enum Commands { /// Tools to solve the wordle Solve { /// Contains these letters #[arg(short, long)] r#in: Option, /// Has these position, as a regex, use ^start, end$ and wor.d extensively #[arg(short, long)] pos: Option, /// Doesnt contains these letters #[arg(short, long)] out: Option, }, /// Tools to calculate best words for a wordle Calculate { /// Number of guesses targetted #[arg(short, long)] number: Option, /// How many branches to try, warning exponential solving time #[arg(short, long, default_value_t = 5)] depth: usize, }, }