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

create-envexample

v1.2.3

Published

A simple CLI tool to create .env.example files from your .env files, making it easier to share environment variable structures without exposing sensitive data

Readme

🔨 Create env.example

A simple npm package to create a .env.example file from a .env file.

🎯 Introduction

When working with environment variables, it's common to have a .env file that contains sensitive information such as API keys or database credentials. However, when sharing your project with others or committing it to a version control system, you may want to exclude this sensitive information. That's where .env.example comes in!

🚀 Installation

# Install globally
npm install -g create-envexample

# Or use with npx
npx create-envexample

📝 Usage

To create a .env.example file from your .env file, simply run:

npx create-envexample

⚙️ How it works

The package performs these steps:

  1. Reads your .env file
  2. Filters out comment lines (starting with #)
  3. Replaces sensitive values with empty placeholders
  4. Creates a new .env.example file

💡 Example

Your .env file:

DB_HOST=localhost
DB_USER=myuser
DB_PASSWORD=mypassword
API_KEY=1234567890

Generated .env.example:

DB_HOST=
DB_USER=
DB_PASSWORD=
API_KEY=

🎯 Options

The following command-line options are available:

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --output | -o | Specify output file path | .env.example | | --sort | - | Sort variables and comments alphabetically | false | | --no-comments | - | Remove all comments from output | false | | --delimiter | - | Specify custom delimiter | = | | --verbose | - | Enable verbose mode for debugging | false | | --help | -h | Show help information | - |

📚 Examples

Basic usage:

npx create-envexample

Custom output path:

npx create-envexample -o ./config/.env.template

Sort variables:

npx create-envexample --sort

Remove comments:

npx create-envexample --no-comments

Use custom delimiter:

npx create-envexample --delimiter :

Combined options:

npx create-envexample -o custom.env --sort --no-comments

🔍 Ignoring Variables

You can create a .envignore file to specify which environment variables should be excluded from the .env.example file:

# .envignore
GENERATED_KEY
TEMP_TOKEN

🌟 Features

  • Preserves comments from original .env file
  • Supports custom output path
  • Optional sorting of variables
  • Configurable delimiter
  • Ability to ignore specific variables
  • Timestamp generation in output file

🤝 Contributing

Contributions are welcome! Feel free to:

  • Fork the repository
  • Create your feature branch
  • Submit a pull request

License

create-envexample is licensed under the ISC license