Open source project / 2026
EnvDoctor
A zero-dependency Python tool for checking .env files, synchronizing templates and finding undocumented environment variables in code.
Context
Environment variables are the silent contract between local development and production — and they drift constantly.
The problem
A variable added locally but forgotten in .env.example crashes production on deploy; stale variables linger because nobody knows what is still needed.
Approach
EnvDoctor checks the .env ↔ .env.example contract, syncs missing placeholders safely, and audits the codebase with AST analysis to find variables that are used but undocumented.
System architecture
Python standard library only; handles multiline quoted values and emits JSON output for CI pipelines.
Key decisions
Strict mode fails the build on any contract violation — configuration drift is treated as a build error, not a warning.
Outcome
Available on PyPI as envdoctor-cli. Its check, sync and audit commands compare configuration files, add masked placeholders to templates and search source code for environment-variable usage; JSON output supports automation.
Learnings
Onboarding friction and production outages often share one root cause: an unenforced configuration contract.