5 ms·
Seems like Cobra is pretty well established in this space - https://github.com/spf13/cobra https://github.com/spf13/cobra Tho admittedly it works in reverse;
by thanatos_dem 8y ago
Seems like Cobra is pretty well established in this space - https://github.com/spf13/cobra https://github.com/spf13/cobra
Tho admittedly it works in reverse; it generates the doc/help info rather than parsing it into an AST. It addresses the “boilerplate” issue with code gen as well, but it has a CLI to generate code that’s pretty powerful.
For instance, how does docli handle subcommands? How about global vs command specific flags? For any case beyond the basic single command CLI, it seems like there would need to be all sorts of magic and non-obvious formatting requirements on the doc string.
- celicoo 8y agoHey thanatos_dem Right now Docli can't handle those scenarios, but it will on the next big release - which it might take a while because it's not trivial to add those features and keep the API simple.
- celicoo 8y agoHey! I've opened an issue to discuss about the subcommands feature: https://github.com/celicoo/docli/issues/10 https://github.com/celicoo/docli/issues/10 I would love to know your opinion about it.