EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

Truly global .env configuration.

Open Luttik opened this issue 2 years ago • 5 comments

It seems to me that in virtually every situation you want to load the .env file if it is available in the working directory or project root. I'd love to have support for this in a way that just enables this cross-project and cross-pycharm-feature.

Especially for those who manage many projects the best workflow you can currently have (as far as I know) is the following

  • for each new project
  • For each run configuration template that you plan to use (which can easily be 5+)
  • edit the run configuration by 1. going to the envfile tab 2. enabling envfile 3. click +. 4. Navigate to the correct folder. 5 Select the .env file

After this you still have to manually load the .env config for some pycharm elements like the terminal.

I think that this concept of a cross-project default configuration can easily prevent 100 clicks for every new project in just the setup.

Additionally letting people pick the .env file using a path in plaintext rather than a file picker would also drastically lower the time it takes to do the setup.

Luttik avatar Jan 27 '22 11:01 Luttik

Yes! If I right-click on a unittest module, class, or function and run/debug it, it automatically creates a new run configuration. if it doesn't exist yet. So, I can easily have 20 different run configurations.

This requested feature is really a deal-breaker for me.

At this point, it seems the simplest way is to edit the activate script in the virtual environment. It's an ugly way to do it, but it works.

marjeta42 avatar Jan 31 '22 00:01 marjeta42

Hello, Same here, we have many many java projects, and it's tiresome for each one to specify the file. If you have a .env at the root level of your project, it could be automatically loaded without any risks I think, like NPM does. Thanks

lzorzer avatar Mar 08 '22 10:03 lzorzer

Agreed, load default dot env file at root directory is very useful feature

luiscoms avatar Apr 20 '22 17:04 luiscoms

I guess that is related to #31

luiscoms avatar Apr 20 '22 17:04 luiscoms

So who is working on this or what is involved in moving the ball forward? I can help write tests, documentation or code but this would be helpful in the management many projects.

datatalking avatar Jul 30 '22 03:07 datatalking