Skip to content
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

Generate Markdown for CLI Commands #1

Open
nvzqz opened this issue Oct 30, 2019 · 1 comment
Open

Generate Markdown for CLI Commands #1

nvzqz opened this issue Oct 30, 2019 · 1 comment
Assignees
Labels
client/cli Relates to the command line interface (CLI) client kind/docs Improvements or additions to documentation kind/feature New feature or request

Comments

@nvzqz
Copy link
Member

nvzqz commented Oct 30, 2019

Possible CLI commands should be available to read in .md files.

It may be possible to generate markdown for commands with information passed into clap. Or at least when that info is being passed to clap.

@nvzqz nvzqz self-assigned this Oct 30, 2019
@nvzqz nvzqz changed the title Document CLI in Markdown Generate Markdown for CLI Commands Dec 16, 2019
@nvzqz nvzqz added client/cli Relates to the command line interface (CLI) client kind/docs Improvements or additions to documentation kind/feature New feature or request labels Dec 16, 2019
@zicklag
Copy link

zicklag commented Mar 14, 2020

Hey there, I just found this issue and thought I'd point you to something similar that I did for the Lucky project.

There is a Cargo feature flag used to build the CLI as a doc generator that will pull the CLI information and generate mdbook pages: https://katharostech.github.io/lucky/cli/lucky.html. That is then run in CI before publishing the book to GitHub pages.

This may be far departed from what you are going for. Because Lucky has a rather vast and nested CLI I developed a custom command trait to wrap each subcommand and a system for associating the markdown documentation with the subcommands. The documentation can also be rendered in the terminal:

(GIF Image, 1088 × 664 pixels)

Anyway, just throwing this out there if you are interested in anything similar. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client/cli Relates to the command line interface (CLI) client kind/docs Improvements or additions to documentation kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants