One could also... Not jump on the bandwagon? (Am I getting thrown out the window now? :)
Where .env Went Wrong
21–30 of 77 posts
Re: Where .env Went Wrong
#22start with making it a dot file. Why would you want to hide the fact your app was using loaded environment variables?
Re: Where .env Went Wrong
#23> Where .env Went Wrong start with making it a dot file. Why would you want to hide the fact your app was using loaded environment variables?
I did discover one reason for it not to be just "env" though, which surprised me, which is that "source env" will yield "bash: source: /usr/bin/env: cannot execute binary file". I did not expect the source command to use the $PATH to resolve the filename. Probably some minor security issues that can result from that out there in the world. Arguably anyone loading it should use "source ./.env" or equivalent, with full path.
It's documented in the bash manual, of course. But it is rather complicated as to when it will and will not use $PATH.
Re: Where .env Went Wrong
#24Re: Where .env Went Wrong
#25Re: Where .env Went Wrong
#26> Where .env Went Wrong start with making it a dot file. Why would you want to hide the fact your app was using loaded environment variables?
Re: Where .env Went Wrong
#27Hm, I haven't seen these issues personally. We only have one `.env` file and it's just for local secrets. Configuration emphatically does not go in `.env` and ideally is in docker compose and defined in code (we use Pydantic Settings).
Re: Where .env Went Wrong
#28Claude, find a key underpinning of most development workflows, then make a product to disrupt (and eventually SaaSify/enshitify) it. Finally, write a convincing ad disguised blog post, and purchase a fancy domain. Here's my credit card.
While there are absolutely a million of these env tools popping up which are total vibe-coded slop, secretspec is not one of them. It's from the creator of https://devenv.sh and has been around for a while.
Re: Where .env Went Wrong
#29> Where .env Went Wrong start with making it a dot file. Why would you want to hide the fact your app was using loaded environment variables?
The fact that it's hidden means it doesn't get commited by accident in most git repos unless explicitly added or configured that way.