logoalt Hacker News

whalesaladtoday at 9:45 PM0 repliesview on HN

The beauty of the environment is that it can be manipulated prior to running the program. I don't understand the desire to have runtime .env loaders when that env can just be established before the program is run. Every language can read env without a library. The churn in this space is too high... it's a smell.

I have a shell function for this in my zsh config:

    function lenv() {
      export $(cat .env | xargs)
    }
It doesn't get any more unix than this. I do not allow my team to build software that autoloads environment files using libraries. It's such a mess. That is a concern of the shell.