{"id":13478564,"url":"https://github.com/clap-rs/clap-verbosity-flag","last_synced_at":"2025-12-12T13:02:37.899Z","repository":{"id":32489262,"uuid":"135266616","full_name":"clap-rs/clap-verbosity-flag","owner":"clap-rs","description":"Easily add a --verbose flag to CLIs using Clap","archived":false,"fork":false,"pushed_at":"2025-04-03T10:04:57.000Z","size":308,"stargazers_count":194,"open_issues_count":10,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-07T02:25:39.198Z","etag":null,"topics":["clap","cli","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/clap-verbosity-flag","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clap-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-29T08:39:06.000Z","updated_at":"2025-04-07T17:39:52.000Z","dependencies_parsed_at":"2023-09-26T10:03:25.454Z","dependency_job_id":"f003578f-1b69-4347-aa0d-e5ba3bcb76a1","html_url":"https://github.com/clap-rs/clap-verbosity-flag","commit_stats":{"total_commits":169,"total_committers":16,"mean_commits":10.5625,"dds":"0.33136094674556216","last_synced_commit":"5597fc089df56975c489f660d0b6887978f4bca2"},"previous_names":["rust-clique/clap-verbosity-flag"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clap-rs%2Fclap-verbosity-flag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clap-rs%2Fclap-verbosity-flag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clap-rs%2Fclap-verbosity-flag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clap-rs%2Fclap-verbosity-flag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clap-rs","download_url":"https://codeload.github.com/clap-rs/clap-verbosity-flag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253562655,"owners_count":21927918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clap","cli","rust"],"created_at":"2024-07-31T16:01:58.770Z","updated_at":"2025-12-12T13:02:37.893Z","avatar_url":"https://github.com/clap-rs.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# clap-verbosity-flag for `log` / `tracing`\n\n[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation]\n![License](https://img.shields.io/crates/l/clap-verbosity-flag.svg)\n[![crates.io](https://img.shields.io/crates/v/clap-verbosity-flag.svg)][Crates.io]\n\n[Crates.io]: https://crates.io/crates/clap-verbosity-flag\n[Documentation]: https://docs.rs/clap-verbosity-flag/\n\nEasily add `--verbose` and `--quiet` flags to CLIs using [Clap](http://crates.io/crates/clap).\n\n## Examples\n\n```console\n$ cargo add clap-verbosity-flag\n```\n\n```rust\nuse clap::Parser;\n\n#[derive(Debug, Parser)]\nstruct Cli {\n    #[command(flatten)]\n    verbosity: clap_verbosity_flag::Verbosity,\n}\n\nfn main() {\n    let args = Cli::parse();\n    env_logger::Builder::new()\n        .filter_level(args.verbosity.into())\n        .init();\n    // Your code here\n}\n```\n\nFor [`tracing`](https://crates.io/crates/tracing) support, use the `tracing` feature:\n\n```console\n$ cargo add clap-verbosity-flag --no-default-features --features tracing\n```\n\n```rust\nuse clap::Parser;\n\n#[derive(Debug, Parser)]\nstruct Cli {\n    #[command(flatten)]\n    verbosity: clap_verbosity_flag::Verbosity,\n}\n\nfn main() {\n    let args = Cli::parse();\n    tracing_subscriber::fmt()\n        .with_max_level(args.verbosity)\n        .init();\n    // Your code here\n}\n```\n\nThe default verbosity level will cause `log` / `tracing` to only report errors. The flags can be\nspecified multiple times to increase or decrease the verbosity level. See the [Documentation] for\ninfo on how to change the default verbosity level.\n\n- silence output: `-q` / `--quiet`\n- show warnings: `-v` / `--verbose`\n- show info: `-vv` / `--verbose --verbose`\n- show debug: `-vvv` / `--verbose --verbose --verbose`\n- show trace: `-vvvv` / `--verbose --verbose --verbose --verbose`\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/license/mit\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual-licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclap-rs%2Fclap-verbosity-flag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclap-rs%2Fclap-verbosity-flag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclap-rs%2Fclap-verbosity-flag/lists"}