Scan Your Project
Automatically find all environment variables used in your files (process.env, import.meta.env, and $env imports).
Env-Doctor is a CLI tool to scan your project for environment variables, detect missing or unused keys, and ensure your project runs safely and efficiently.
Get StartedAutomatically find all environment variables used in your files (process.env, import.meta.env, and $env imports).
Compare used keys with your .env files and highlight missing or unused keys quickly.
Supports Node.js, Vite, Next.js, Astro, SvelteKit, and other modern frameworks seamlessly.
Install globally or locally and run the CLI command:
npm install -g envdoc
envdoc diagnose
It will scan your current working directory, read all .env files, and output:
Used keys in code: [ 'PORT', 'DEBUG', 'DB_HOST', 'API_SECRET', 'API_KEY' ]
Keys defined in .env files: ["API_KEY", "DB_URL", "SECRET"]
WARNING: Missing keys in .env file(s): ["AUTH_TOKEN"]
WARNING: Unused keys in .env file(s): ["SECRET"]
.env.example to document required keys for team members.Contributions, issues, and feature requests are welcome! Check the GitHub repository.
MIT License