A beautiful, interactive CLI to diagnose and fix missing local environment variables.
You pulled down a project, ran npm run dev, and it crashed because someone added a new .env variable and forgot to tell you. env-doctor prevents "it works on my machine" syndrome by validating your .env against .env.example and interactively prompting you to fill in the gaps.
- ✨ Zero configuration — just run it in your project root
- 🎨 Beautiful UI powered by
@clack/promptsandpicocolors - 🛡️ Non-destructive — appends new keys without touching existing ones
- ⚡ Extremely fast with minimal dependencies
npx @dinakars777/env-doctorOr install globally:
npm install -g @dinakars777/env-doctor
env-doctor| Flag | Description | Default |
|---|---|---|
--example <path> |
Path to the example env file | .env.example |
--env <path> |
Path to your local env file | .env |
npx @dinakars777/env-doctor --example .env.template --env .env.local- Reads
.env.exampleand your local.env - Lists any keys that are missing or empty in your
.env - Launches an interactive prompt asking for the missing values
- Safely appends them to your
.env— you're ready to code
| Package | Purpose |
|---|---|
@clack/prompts |
Beautiful interactive CLI UI |
picocolors |
Terminal color output |
| TypeScript | Type-safe implementation |
git clone https://github.com/dinakars777/env-doctor.git
cd env-doctor
npm install
npm run devMIT