Expand description
Opinionated helpers for building consistent command-line interfaces with clap
and simplelog
.
Example
The prelude
module exports a minimal subset of these two crates.
use hst_cli::prelude::*;
#[derive(Debug, Parser)]
#[clap(name = "demo", version, author)]
struct Opts {
#[clap(flatten)]
verbose: Verbosity,
}
fn main() -> Result<(), log::SetLoggerError> {
let opts: Opts = Opts::parse();
opts.verbose.init_logging()?;
Ok(())
}