#clap #cli

clap-verbosity-flag

Easily add a --verbose flag to CLIs using Clap

16 releases (8 stable)

new 2.2.0 Feb 14, 2024
2.1.1 Dec 15, 2023
2.1.0 Oct 23, 2023
2.0.1 Mar 31, 2023
0.1.0 May 29, 2018

#13 in Command-line interface

Download history 16905/week @ 2023-10-31 14002/week @ 2023-11-07 13398/week @ 2023-11-14 13422/week @ 2023-11-21 15376/week @ 2023-11-28 13151/week @ 2023-12-05 14348/week @ 2023-12-12 13785/week @ 2023-12-19 9557/week @ 2023-12-26 14938/week @ 2024-01-02 17506/week @ 2024-01-09 17915/week @ 2024-01-16 17191/week @ 2024-01-23 19049/week @ 2024-01-30 20062/week @ 2024-02-06 15078/week @ 2024-02-13

74,584 downloads per month
Used in 293 crates (222 directly)

MIT/Apache

12KB
130 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.3–1.9MB
~36K SLoC