clever-tools
clever-tools copied to clipboard
.env import at app creation
When a user creates an app, there is no way to import environment variables automatically. Such a feature would enable easier creation from existing code (open source projects, tutorials, etc.).
As the .env file is a common standard, used in many project, we could:
- detect its presence during
clever create - ask the user if he wants to import its content
- do it if asked
we need to talk about the "ask" part because not all CLI usage are in an interractive shell
I agree on this. I didn't include anything to bypass "ask" part for this feature because it will depend if it's accepted or not, and if #634 is accepted or not. If it's both, we could move to a global -y/ --yes strategy (for example) to bypass questions in the create command.
This will be awesome.
But -y or --yes will break all existing script or add unexpected behavior.
Maybe a --with-env=<path-to-env-file> will do the same without breaking change in the CLI.
In my opinion allowing the user to choose the file he wants when the app is created is more flexible.
And if --with-env used as a flag CLI argument, then <path-to-env-file> can be set to ./.env by default