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 πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

dotenv-checker

v1.1.7

Published

πŸ”Œ CLI to check/generate .env files and maintain them synchronized

Downloads

15,855

Readme

πŸ”Œ dotENV-checker standard-readme compliant

Environment file checker/generator

πŸ”– Description

This application is a checker/generator for environment files. It checks, based on a schema/base file, if your .env is up-to-date and it maintains them synchronized.

πŸ“¦ Installation

# Install the cli in devDependencies
$ npm i dotenv-checker -D

πŸš€ Usage

{
  "scripts": {
    "check-env": "dotenv-checker -s .env.schema -e .env.local",
    // Execute the check-env before starting your application
    "dev": "npm run check-env && next dev"
  }
}

πŸ› οΈ CLI Options

You can customize the cli options. Here you have the possible customizations:

🟣 --schema or -s (default: ".env.schema")

Sets the custom file to be used as a schema/base file. This is the file which is used to sync the environment file

# Set a custom schema (file to be based on)
dotenv-checker --schema .env.base

🟣 --env or -e (default: ".env.local")

Sets the custom file to be synchronized with the schema file. In case this file is out-of-sync and has some keys that the schema doesn't have, it reports the named keys to you through terminal

# File to check that needs to be in sync with schema file
dotenv-checker --env .env.local

🟣 --skip-create-question or -scq (default: "true")

By default it auto create the environment file if it doesn't exist. If you set this to "false" you can force to be asked to create it or not in case it's needed

# File to check that needs to be in sync with schema file
dotenv-checker --skip-create-question=false

🟣 --skip-update-question or -suq (default: "true")

By default it auto updates the environment file if it differs from schema file. If you set this to "false" you can force to be asked to update it or not in case it's needed

# File to check that needs to be in sync with schema file
dotenv-checker --skip-update-question=false

πŸ’» Examples

Files are in sync and no problems were found

Schema has new keys and env file is not synchronized

Environment file has keys that are not in schema


πŸ€“ Happy Code

Created with Typescript! ⚑ and latin music 🎺🎡

This README.md file has been written keeping in mind