Nothing solves env loading and validation better than Varlock.
Nub v0.7 adds first-party support. If your repo contains an .env.schema file, Nub uses Varlock to load/validate your environment when running a file or script π
π .env.example is an anti-pattern
- copy-paste means it gets out of sync
- mix of real values and placeholders
- source of truth is scattered (real env file, validation code, usage sites, readme)
- no way to understand which items are sensitive
.env.schema is the answer!