Generate metadata from clap?

⚓ Rust    📅 2026-03-10    👤 surdeus    👁️ 1      

surdeus

Is there some clap feature or crate that can iterate over clap arguments/subcommands and save them to some machine-readable format?

XY: I have a cli administration tool that is well documented, but the client also wants that documentation in the form of a "Command Reference" pdf. The tool is way too big to do a manual conversion and also keep the tool and book in sync going forward, so I would like to be able to generate the documentation (or at least output the data to a format that can be easily transformed into typst code) from the cli tool.

3 posts - 3 participants

Read full topic

🏷️ Rust_feed