19 releases (11 stable)

new 2.2.3 Nov 16, 2024
2.2.1 Jul 25, 2024
2.2.0 Feb 14, 2024
2.1.1 Dec 15, 2023
0.1.0 May 29, 2018

#13 in Command-line interface

Download history 32288/week @ 2024-07-27 28732/week @ 2024-08-03 31063/week @ 2024-08-10 32960/week @ 2024-08-17 31998/week @ 2024-08-24 35801/week @ 2024-08-31 32231/week @ 2024-09-07 37127/week @ 2024-09-14 38929/week @ 2024-09-21 43799/week @ 2024-09-28 46260/week @ 2024-10-05 44863/week @ 2024-10-12 46146/week @ 2024-10-19 41888/week @ 2024-10-26 43962/week @ 2024-11-02 37538/week @ 2024-11-09

178,210 downloads per month
Used in 368 crates (295 directly)

MIT/Apache

24KB
329 lines

clap-verbosity-flag for log

Documentation License crates.io

Easily add a --verbose flag to CLIs using Clap

Examples

use clap::Parser;

// ...
#[derive(Debug, Parser)]
struct Cli {
    #[command(flatten)]
    verbose: clap_verbosity_flag::Verbosity,
}

By default, it'll only report errors.

  • -q silences output
  • -v show warnings
  • -vv show info
  • -vvv show debug
  • -vvvv show trace

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.2–1.8MB
~34K SLoC