Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
https://docs.go-blueprint.dev/
MIT License
5.96k stars 336 forks source link

Proposal: Add ability to save a template of the command #57

Closed nickwarters closed 10 months ago

nickwarters commented 1 year ago

Getting a bit meta with a template of a template, but as this project grows and new options get added like #11 it could be good to add ability to save a template of the project using the options selected.

Currently it's only name and framework but I saw there is an open issue (#11) for adding db setup too. If the db setup issue gets added then having a re-usable thing with only the name needing to be suppled would be useful.

example usage could be something like: go-blueprint create --name test-project --framework gin --save-template new-template or selected at the end if using the interactive version. Then something like this to use the template go-blueprint create --template new-template --name not-another-test-project

basokant commented 1 year ago

What would be the difference between this and say, making the "template" just be a shell alias or native completion?

nickwarters commented 1 year ago

No difference really other than it be built in

Melkeydev commented 1 year ago

This is a really cool idea but I do have a concern on how this could scale. Or, better yet, how do we save all the combinations possible to then be re-used? Where would these combo's be saved and referenced?

nickwarters commented 1 year ago

I dont think you need to save all the possible combinations, just allow the user to save one they are currently running. In terms of where to save, ~/.config/go-blueprint/some-config-file ???