-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Generate CLI documentation automatically #3157
base: main
Are you sure you want to change the base?
Conversation
653fda9
to
8ed3935
Compare
#[derive(Parser, Debug)] | ||
#[clap(verbatim_doc_comment)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we would need to use verbatim_doc_comment
for every comment, so that --help
shows something readable. As the raw text will be displayed in the terminal we will need to decide how much markdown we accept in here.
This is definetly the way forward, but I think we should fork/vendor the implementation and make sure we can split up the document a little more. |
@ruben-arts would indenting sub-commands in that single page markdown be enough? or generating separate pages is a must? |
@ruben-arts I have matched current CLI.md indentation levels. let me know if this is okay? |
1ed6765
to
c630244
Compare
Fixes #3022
This uses the
clap-markdown
crate to generate the CLI doc. As it stands, the documentation is on a single page, with no indentation for subcommands. Would you be happy to live with the default layout ofclap-markdown
?Otherwise, we could either vendor the code or add more configuration options upstream.
Would need to happen next: