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 cli_helpers::prelude::*;
#[derive(Debug, Parser)]
#[clap(name = "demo", version, author)]
struct Opts {
#[clap(flatten)]
verbose: Verbosity,
}
fn main() -> Result<(), cli_helpers::Error> {
let opts: Opts = Opts::parse();
opts.verbose.init_logging()?;
Ok(())
}
Modules§
Structs§
- Timestamp
- A timestamp represented as either an epoch second or the
en_US.UTF-8
default on Linux. - Verbosity