EnvDrift
catch .env.example desync before it bites your team
npx -y github:Isco0819/env-driftEver run into this?
Like dotenv-linter which has real GitHub traction for .env syntax linting, but no tool tracks which process.env.* vars your code actually uses vs what .env.example documents. New devs clone the repo and hit cryptic crashes from missing vars. AI agents silently add new env dependencies without updating the example file.
The fix
npx CLI and MCP server that statically scans JS/TS/Python source for every env var reference, diffs against .env.example, and streams missing/undocumented/unused var sets to your agent before it commits.
What it does
- AST + regex scan across JS/TS/Python for process.env.VAR, import.meta.env.VAR, and os.environ patterns with file+line attribution
- three-set diff: MISSING (used in code, absent from example), GHOST (in example, unused in code), SHADOW (in .env but not in example)
- MCP tools env_health() / list_usages() / check_var(name) so agents can query env state before adding new vars