Custom generators #1904
-
First, let me say thank you for a fantastic project! I'm currently generating documentation for a project of mine and would like to auto-generate the documentation for CLI flags, options, and subcommand based on an XML or JSON file. I notice that clap has built-in support for generating shell completions, but the introspective part of clap doesn't seem to be exposed to the outside world (at least that's my impression). My question is, is it possible to implement a custom generator for clap without forking the project? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Is your documentation in XML/JSON, or the CLI spec that you're building a clap implementation XML/JSON? The introspective part is technically public (because its what Also, once the manpage generation feature is complete, you may be able to some sort man->your documentation conversion easier than using claps introspection. |
Beta Was this translation helpful? Give feedback.
-
Hmm, this wasn't our (@pksunkara and I) intention. These getters were supposed to be exposed to for this exact reason: allow users to query various info from an |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! Just to make sure I understand correctly. The Thanks! |
Beta Was this translation helpful? Give feedback.
Hmm, this wasn't our (@pksunkara and I) intention. These getters were supposed to be exposed to for this exact reason: allow users to query various info from an
App
instance. And I believe they are documented 😄.