I wrote a similar thing for OFBiz: createPlugin. It’s easy to do thanks to groovy and GString. Essentially you can parameterize the component with a few parameters (default name, a few other args) which then generates a component based on these. And I think it would be great to have that feature in the core (either in the framework itself or maybe in runtime or something like that).
I can definitely write something like that if people find it useful. I might even base it on @michael work above.
I think that would be a great idea @michael people would most likely use that feature. I know I would.
Maybe you can even customize it like other starter templates to choose for example whether or not to use macros, or whether tests should be generated. Something similar to create-react-app or other starter generators.
I have tested it and it works well.
I also used --console=plain in command to hide gradle Executing/Progress bar and the interaction looks more friendly. ./gradlew -Pcomponent=my_component createComponent --console=plain