Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.env import at app creation #651

Open
davlgd opened this issue Jan 1, 2024 · 3 comments · May be fixed by #652
Open

.env import at app creation #651

davlgd opened this issue Jan 1, 2024 · 3 comments · May be fixed by #652
Assignees

Comments

@davlgd
Copy link
Contributor

davlgd commented Jan 1, 2024

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
@davlgd davlgd self-assigned this Jan 1, 2024
@davlgd davlgd linked a pull request Jan 1, 2024 that will close this issue
@miton18
Copy link
Contributor

miton18 commented Jan 2, 2024

we need to talk about the "ask" part because not all CLI usage are in an interractive shell

@davlgd
Copy link
Contributor Author

davlgd commented Jan 2, 2024

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.

@chmuche
Copy link

chmuche commented May 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants