EnvDrift Guard
Local-first environment variable drift detector, hardcoded secret scanner, multi-environment matrix diff, and strict TypeScript + Zod / Python Pydantic schema generator for VS Code and Cursor.
100% deterministic local analysis — zero cloud code uploads, zero LLM API calls.
Features
Free Tier
- Real-time Diagnostics across
.env, .env.example, .env.local, .env.staging, .env.production, wrangler.toml, wrangler.jsonc, and docker-compose.yml.
- Code Reference Scanning for
process.env.*, import.meta.env.*, os.environ[...], and os.getenv(...) across .ts, .tsx, .js, .jsx, and .py.
- Drift Detection: Undeclared variables used in code, unused keys in
.env*, and keys missing from .env.example.
- Hardcoded Secret Detection: Local regex scanner for AWS, Stripe, Polar.sh, GitHub, Cloudflare tokens, and private keys with automatic redaction.
Pro Tier (Polar.sh License)
- Multi-Env Matrix Diff Webview: Side-by-side comparison of every key across all environment files and code references.
- Strict Schema Generator: One-click generation of
zod TypeScript schemas or Python pydantic-settings classes.
- Drift Report Export: Export redacted Markdown or JSON drift reports for PRs and audits.
Commands
EnvDrift: Scan Workspace
EnvDrift: Activate Pro License
EnvDrift: Show Multi-Env Matrix Diff (Pro)
EnvDrift: Generate TypeScript + Zod / Pydantic Schema (Pro)
EnvDrift: Export Drift Report (Pro)
Settings
envdrift.licenseValidatorUrl: Polar.sh license validation worker URL (default: https://api.b2btoolstudio.com).
envdrift.ignoreKeys: Variable names to exclude from undeclared-key diagnostics.
envdrift.scanOnSave: Automatically re-scan on file save.
envdrift.secretDetection: Enable local hardcoded secret detection.
| |