News for hackers. Stuff that matters.

Show HN: I just fixed .env once and for all – better-env

https://better-env.dev

.env files have always felt archaic, insecure, clunky and honestly just not fun to work with. I see my friends (and myself) accidentally committing them all the time. Managing secrets across projects becomes a mess of copy-pasting keys into scattered env files with no real way to sync anything.

So I built better-env: a secure, developer-friendly alternative to .env.

Store your secrets once in a global encrypted store, and load them per-project at runtime.

I’d love feedback on whether this feels useful beyond solo devs, and what you’d want for teams or CI setups.

Fully open source: https://github.com/HarishChandran3304/better-env

( 4 comments | 6 points | on HN )
Re:Show HN: I just fixed .env once and for all – better-env by robinroy03 on Sunday November 23, 2025 @02:01PM (#46026285)
I was searching for something like this. So will other developers of the repo also need the tool?
Re:Show HN: I just fixed .env once and for all – better-env by harish3304 on Sunday November 23, 2025 @02:09PM (#46026339)
Yes, they can just clone and directly run the app with their own set of secrets if better-env is set up.
Re:Show HN: I just fixed .env once and for all – better-env by bootesvoid on Monday November 24, 2025 @03:02AM (#46031514)
ts so peak
Re:Show HN: I just fixed .env once and for all – better-env by itsanaccount on Monday November 24, 2025 @07:28AM (#46033383)
if you believe like i do that gpg is an awful dead and outdated tool you'd never enforce on your worst enemy, its a good time to mention sops supports age.

https://github.com/chrisdeutsch/direnv-sops