Ask HN: How do small teams securely share env files?
The article discusses how small teams can securely share environment files. Environment variables should be set outside of the application context, allowing developers to choose how to load them. The author recommends using Infisical and direnv to manage secrets and non-sensitive environment variables.
- ▪Environment variables should be set outside of the application context.
- ▪Infisical is a free and self-hostable tool for managing secrets.
- ▪Direnv is a tool for loading environment variables from a .envrc file.
2 outlets in our directory ran this story, first to last over 22 hours. All of the coverage we found sits in one bucket: centre. That one-sidedness is itself worth noticing.
- ▪ Securely sharing .env files in small teams — r/reactjs
Hacker News (Newest) files mainly under programming. We currently carry 5,257 of its stories.
Opening excerpt (first ~120 words) tap to expand
IMO env files are a bit of an anti-pattern, env vars should be set outside the context of your app so that your app doesn't need to care where they come from, it just uses standard env var APIs to read them. This means developers can choose how they load them and what tools they use to do so.With that said, the problem still exists just one layer higher. If they are secrets, I use Infisical (https://infisical.com/) which is free and self-hostable, and let's you inject secrets at runtime via their CLI. Very handy for small teams.On top of that, I use direnv (https://direnv.net/) with a hook to infisical's export command.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Ycombinator.