Missing or outdated .env.example file
A .env.example file lists every environment variable your app expects, with placeholder values instead of real ones. It's how anyone, including your future self or your AI coding assistant, knows what to configure to run the project.
#What goes wrong
As a project grows, new environment variables get added directly to the real .env file, which is gitignored, as it should be, without a matching entry ever being added to .env.example. The example file falls out of sync with what the app actually needs.
#Why it matters
Without a current .env.example, setting up the project fresh, on a new machine, for a new contributor, or when your AI editor is trying to help debug a 'why doesn't this work' issue, turns into guesswork. Missing environment variables are one of the most common causes of 'it works on my machine but not here.'
#How Heimdall checks for this
Heimdall compares every environment variable your code actually reads against what's listed in .env.example, and flags variables that are used in the code but missing from the example file.
#How to fix it
Add every environment variable your code references to .env.example with a placeholder or dummy value. Ask your AI coding tool to scan the codebase for process.env usages and update the file automatically, then keep it in the habit of updating alongside any new integration.
Frequently asked questions
Should .env.example contain real values?
Do I need this if I'm the only developer?
Can I generate this automatically?
Run this check on your own repo
Heimdall scans your GitHub repo for this and 29 other issues in under a minute.
