Use TOML for `.env` Files?
I find the Twelve-Factor App&#x27;s design to use environment variable for configuration (<a href="https:&#x2F;&#x2F;12factor.net&#x2F;config" rel="nofollow">https:&#x2F;&#x2F;12factor.net&#x2F;config</a>) unintuitive and perhaps a bad design choice. I believe environment variables are bad for the same reasons global variables are bad.<p>Pros listed for env vars include <i>not</i> committing them to the repo and <i>not</i> encouraging grouping them together as environments such as dev, staging or prod. I don&#x27;t agree that these are always good goals, but if they are, the same can be achieved with config files: don&#x27;t commit them to the repo, generate them on the fly.<p>The existence and prevalence of .env files is proof that using environment variables as an alternative has failed. Using Twelve-factor as a reference and .env files at the same time is a bit of a contradiction.<p>Another alternative to consider for both env vars and config files are command line arguments.