#shell-completion #clap #command-line #clap-parser #manpage #applications #user

clap_allgen

The complete clap generation utility to give your command-line application users a more polished experience right out of the box

2 releases

0.1.1 Apr 9, 2024
0.1.0 Jan 9, 2024

#6 in #manpage

Download history 7/week @ 2024-02-07 169/week @ 2024-02-14 62/week @ 2024-02-21 100/week @ 2024-02-28 48/week @ 2024-03-06 25/week @ 2024-03-13 9/week @ 2024-03-20 15/week @ 2024-03-27 83/week @ 2024-04-03 65/week @ 2024-04-10 13/week @ 2024-04-17 52/week @ 2024-04-24 3/week @ 2024-05-01 8/week @ 2024-05-15 39/week @ 2024-05-22

51 downloads per month
Used in openpgp-card-tools

Apache-2.0 OR MIT

13KB
74 lines

Clap All-Gen

CI Crates.io

The complete clap generation utility to give your command-line application users a more polished experience right out of the box.

To create all shell completions use the following command:

use clap_allgen::render_shell_completions;

#[derive(Debug, clap::Parser)]
enum Commands {
  First,
  Second,
  Third,
}

render_shell_completions::<Commands>("/tmp/shell-completions").expect("generation to work");

To generate man pages for your commands use:

use clap_allgen::render_manpages;

#[derive(Debug, clap::Parser)]
enum Commands {
  First,
  Second,
  Third,
}

render_manpages::<Commands>("/tmp/man-pages").expect("generation to work");

License

This project is licensed under either of:

at your option.

Contribution

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

Dependencies

~1.4–2MB
~37K SLoC