npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sharmapukar217/dotenv-utils

v1.0.0

Published

env utils to manage .env files

Readme

dotenv-utils

dotenv-utils is a simple and interactive CLI utility to help you manage your .env files.
It enables you to generate .env.example files by extracting keys from existing .env files, and also to create .env files interactively by filling in missing values based on .env.example.


Features

  • Generate .env.example files by copying keys from your .env and stripping out the values to avoid leaking secrets.
  • Create or update your .env file interactively by prompting for each variable defined in .env.example.
  • Skip variables during configuration by pressing Ctrl+C.
  • Clear informative messages and error handling for better developer experience.

Installation

You can install dotenv-utils globally via npm:

npm install -g dotenv-utils

Or use it directly via npx without global install:

npx dotenv-utils <command> [options]

Commands

gen-env-example

Generate a .env.example file by copying all keys from your .env file, replacing all values with empty strings.

dotenv-utils gen-env-example -i .env -o .env.example

Options

  • -i, --input <file>: Path to the source .env file (default: .env)
  • -o, --output <file>: Path where the generated .env.example file will be saved (default: .env.example)

configure-env

Create or update your .env file interactively by reading keys from a .env.example file and prompting you to enter their values.

dotenv-utils configure-env -i .env.example -o .env

Options

  • -i, --input <file>: Path to the .env.example file to read keys from (default: .env.example)
  • -o, --output <file>: Path where the resulting .env file will be saved (default: .env)

You will be prompted to enter a value for each environment variable defined in .env.example. If you want to skip a variable, press Ctrl+C to abort the process.


Usage Example

  1. Generate an example file from your existing .env:
dotenv-utils gen-env-example
  1. Commit .env.example to your repository to share environment variable keys without secrets.

  2. When setting up a new environment, run:

dotenv-utils configure-env

and fill in the requested values interactively.


Development

Build

Install dependencies, then run:

npm run build

Run locally

Run your CLI directly from the built files:

node dist/index.js <command> [options]