-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Hi there!
I'm proposing a change to cobra-cli that would allow this command to find some way to make the tpl package more customizable.
Use case:
We have a CLI that our dozen+ person team all contributes to in order to be more effective at our jobs. This has made this cobra CLI to become incredibly complex through organic growth. The way we declare our arguments has deviated from the base template that's provided, and we have extended the Command interface to better suit our use case through inheritance. With those changes (which are slowly being rolled out to our codebase) I think it would be nice to be able to use this command utility with a custom template defined within our codebase for how a "new empty command" should look like, compared to our current workflow of copying a "simpler" command file, and trying to change all of the things to get it working.
Ideally - there would be some pre-defined directory or file within the root of a cobra-based project that would declare the templates, and then only if that file is present the cobra-cli tool would automatically default to using that template for new commands rather than the one defined within the tpl package inside this repo.
I'm more than happy to work on building out this feature, if you like the idea.
Thanks for your consideration,
Kirk