Is is possible to create nested/subcommands?
See original GitHub issueI am trying to achieve nested/subcommands but it’s a bit challenging. Is it possible at the moment, or it would need to be implemented?
e.g.
my-cli pizza create order --verbose
commander is supporting it through the following approach: https://github.com/tj/commander.js/blob/master/examples/nestedCommands.js
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Nested SubCommands - Typer
Typer, build great CLIs. Easy to code. Based on Python type hints.
Read more >Creating nested subcommands using Thor - Stack Overflow
I have successfully used subcommands of subcommands, although there is a small bug. I haven't tried preserving class_options for subcommands ...
Read more >Sub-subcommands (nested commands) · Issue #127 - GitHub
Yes, there should be no need to implement any interfaces or do anything other than the normal annotations for nested subcommands. Ease of...
Read more >Executing Nested Commands - Clikt
Clikt supports arbitrarily nested commands. You can add one command as a child of another with the subcommands function, which can be called...
Read more >CLI with nested sub-commands and tab completion : r/rust
Yes, clap integrated structopt and supports nested subcommands. Structopt only works with clap v2 libraries and clap_complete only works with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks for the clarification! Probably following the Module approach embraced by NestJS wouldn’t play well with Commander’s subcommand features, because it’s like you stated in the last comment: even parent’s command can have its own implementation. The Example you pasted looks good to me. Instead, what do you think about the opposite, leaving the parents to register the first level subcommands?
closed by #67. Available in 2.3.0