This crate provides simple method for generating help messages for your CLI application.
- command() for chaining commands to build help message
- build() for generate help message
use help_crafter::enums::{DASHED, Parameter};
use help_crafter::HelpMessageBuilder;
let help = HelpMessageBuilder::default()
.command("i", "index", Parameter::NO, "index", DASHED::YES)
.command(
"k",
"kill",
Parameter::REQUIRED("sessions_id"),
"the big brown fox jumps over the lazy dog the big brown fox",
DASHED::YES,
)
.command(
"",
"rub",
Parameter::OPTIONAL("something"),
"rub something",
DASHED::NO,
)
.command(
"t",
"",
Parameter::REQUIRED("something"),
"t something",
DASHED::YES,
)
.command(
"o",
"",
Parameter::OPTIONAL("something"),
"o something",
DASHED::NO,
)
.build();