# env Doctor

> Page: https://oumarouss.saaretech.com/en/projects/env-doctor
> Category: Tool
> Type: Command line
> Status: Open source
> Version française: https://oumarouss.saaretech.com/fr/projects/env-doctor.md

_Check your environment variables before you deploy. env-doctor scans your code, cross-references .env and .env.example, and catches missing, unused, or out-of-sync variables._

env Doctor is a command-line tool that allows you to check the consistency of your environment variables.

A variable forgotten in .env.example, a half-renamed key, a missing secret in production: environment variable bugs are silent and always show up at the worst moment. env-doctor tackles this with a single command.

It scans your code (JS/TS with process.env and import.meta.env, Python with os.environ, os.getenv and pydantic, plus NEXT_PUBLIC_* and EXPO_PUBLIC_* prefixes) and cross-references the results with your .env and .env.example. You see exactly what’s missing, what’s no longer used, and what’s out of sync.

Use --fix to automatically add missing variables to .env.example. Use --security to flag weak or default values, validate URL formats, and enforce UPPER_SNAKE_CASE naming. In CI, --ci fails the build when something’s wrong, and --markdown generates a report ready to paste into a PR comment.

Works with monorepos, respects .gitignore and .envdiffignore, and is configurable through .envdiffrc. Requires Node.js 18+, open source under the MIT license.

## Links

- Website: https://www.npmjs.com/package/@oumarou_sanda_souley/env-doctor
- Source code: https://github.com/OumarouSandaSouley/env-doctor
