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
Allow grouping of commands #684
Comments
I like this idea. Unfortunately I think the commands API is a little cumbersome when it comes to adding new features (the latest at the time of this writing was command aliases). For command modules, it's no problem, but for non-module commands, we have to either get creative or come up with a better API (something other than just tacking on new method arguments). I'll give this some thought. |
I thought so, that's the reason I didn't come up with a concrete example how that might look myself. |
Would you accept a pull request that adds |
Any updates about this? |
@itai-codefresh Nope, I ended up using |
That feature would be awesome indeed. I tried looking at the code to see if I could come up with an implementation but there are things I don't quite understand in the code. From what I gather, a method Where I'm getting lost is with the I could probably try to implement something but I guess I'd need a little helping hand. |
@nexdrew is there any news on this? It would be a great feature. If providing the feature only for command modules is easy, you could start by providing only that; it would still be better than nothing. For the non-module way of adding commands, I would suggest either |
I continue to think this would be a slick feature, if anyone wants to take it on. |
+1 on this. I recently built an extensible CLI app with growing number of commands. The command groups (with an alternative / or customisable |
+1 - still relevant 2ish years later - anything that grows beyond 4-5 commands will benefit from this in terms of usability. |
+1 still relevant, many commands in the CLI we are building. |
+1 |
It's amazing that we have the possibility to group options under a certain headline.
It would be great though to be able to do the same with commands.
In case anyone's not convinced how that would be useful, I'll explain my personal use case:
I made a CLI tool that has some built-in commands but is pluggable in a way so commands can be added from outside.
I'd like to kind of set apart those commands from the built-in ones in the
--help
, maybe under a "Plugins" headline.The most convenient way in my eyes would be to be able to group commands.
What do you think?
The text was updated successfully, but these errors were encountered: