Most other CLI packages use type systems to automate the creation of --help or man-page-like output for configured commands. I haven't found any way to do this for Clack commands.
This doesn't need to be a full, opinionated CLI setup — in fact it shouldn't be as that's clearly out of scope for this package. Rather I'm just looking for a way to turn a strongly typed Clack command into a string of text documenting what arguments it takes. To my mind that's the last primitive needed to rapidly build CLIs with Clack.
Describe the solution you'd like
Ability to generate plaintext descriptions of Clack commands and their arguments.
Describe alternatives you've considered
- Manually documenting each command.
- Maybe there's a third-party package that can do this and works with Clack, but I've looked and not found anything that appears to have concensus.
Additional context
I'm very surprised that I haven't found anyone else asking for this yet, so it makes me feel like I'm missing something here. Maybe there is somehow a giant hole in my mental model for this package, apologies if so!
I am very impressed with Clack and was looking forward to using it, but I don't see how I can build a CLI around this without an answer for auto-generating help docs based on the command code. Are people just using other CLI library tools but driving the input interfaces with Clack instead of using the built-in setups? That just feels like putting a hat on a hat to me.
Most other CLI packages use type systems to automate the creation of
--helpor man-page-like output for configured commands. I haven't found any way to do this for Clack commands.This doesn't need to be a full, opinionated CLI setup — in fact it shouldn't be as that's clearly out of scope for this package. Rather I'm just looking for a way to turn a strongly typed Clack command into a string of text documenting what arguments it takes. To my mind that's the last primitive needed to rapidly build CLIs with Clack.
Describe the solution you'd like
Ability to generate plaintext descriptions of Clack commands and their arguments.
Describe alternatives you've considered
Additional context
I'm very surprised that I haven't found anyone else asking for this yet, so it makes me feel like I'm missing something here. Maybe there is somehow a giant hole in my mental model for this package, apologies if so!
I am very impressed with Clack and was looking forward to using it, but I don't see how I can build a CLI around this without an answer for auto-generating help docs based on the command code. Are people just using other CLI library tools but driving the input interfaces with Clack instead of using the built-in setups? That just feels like putting a hat on a hat to me.