New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dotenv-wizard

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-wizard

Interactive CLI to generate your .env file from a .env.example by prompting for values.

latest
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

dotenv-wizard

Interactive CLI to generate your .env file from a .env.example.

dotenv-wizard makes setting up environment variables for your project quick and painless. It reads your .env.example file, prompts you for each variable, and generates a ready-to-use .env file - perfect for onboarding new developers or configuring projects.

Features

  • Reads .env.example automatically
  • Interactive prompts for each variable
  • Supports default values from .env.example
  • Generates a .env file
  • Optionally masks sensitive input like passwords

Installation

You can run it directly using npx:

npx dotenv-wizard

Or install globally:

npm install -g dotenv-wizard
dotenv-wizard

Usage

By default, dotenv-wizard looks for .env.example in the current directory and outputs a .env file:

npx dotenv-wizard

You can also specify custom paths:

npx dotenv-wizard --example path/to/.env.example --output path/to/.env

Options

FlagDescriptionDefault
-e, --example <path>Path to .env.example file.env.example
-o, --output <path>Path for the generated .env file.env

Example

Given a .env.example like:

DB_HOST=localhost
DB_USER=root
DB_PASS=

Running npx dotenv-wizard will prompt:

Enter value for DB_HOST: localhost
Enter value for DB_USER: admin
Enter value for DB_PASS: ****

And generate .env:

DB_HOST=localhost
DB_USER=admin
DB_PASS=secretpassword

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

MIT

Keywords

dotenv

FAQs

Package last updated on 28 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts