crates/but-clap/README.md
This is our documentation generation library. It uses the Clap derive documentation that is how we generate our help messages to create our man page like documentation as well.
Running this command:
cargo run --bin but-clap
will create a new directory called cli-docs that is Git-ignored and populates
it with one mdx file for each command.
We use the long-about docstrings to do everything. It can take markdown (we use
the unstable-markdown feature in clap to parse correctly) and has some special
sections that are pulled out.
The but-clap crate includes comprehensive tests to ensure that clap-documented Rust files generate correct MDX documentation.
cargo test -p but-clap
The tests cover various command structures:
but command to ensure compatibility