A beautiful, interactive CLI to diagnose and fix missing local environment variables.
(A beautiful, interactive CLI built with
@clack/prompts)
Every developer has pulled down a project, run npm run dev, and watched it crash because they are missing a variable in their .env file that another developer added, but forgot to tell them about.
env-doctor prevents "it works on my machine" syndrome by validating your local .env file against your team's .env.example template and interactively prompting you to fill in missing values.
- ✨ Zero configuration required. Just run the command in your project root.
- 🎨 Beautiful UI. Powered by
@clack/promptsandpicocolors. - ⚡ Extremely fast. Minimal dependencies.
- 🛡️ Non-destructive. Appends new keys without touching your existing ones.
Simply run this command in the root of your project:
npx @dinakars777/env-doctorOr install it globally:
npm install -g @dinakars777/env-doctor
env-doctor- It searches for
.envand.env.examplein your current directory. - It lists any keys present in
.env.examplethat are missing or empty in your.env. - It launches an interactive prompt asking you for the missing values.
- It safely appends them to your local
.envand you're ready to code!
You can specify custom paths for your environment files:
npx @dinakars777/env-doctor --example .env.template --env .env.localPull requests are welcome!
git clone https://github.com/your-username/env-doctor.git
cd env-doctor
npm install
npm run devMIT