/defenv

Node CLI for ensuring the presence of environment variables

Primary LanguageJavaScriptMIT LicenseMIT

defenv

Simple command line interface for ensuring environment variables are defined.

This is meant to be used with npm scripts when environment variables are required for scripts.

Usage

$ defenv [ENVIRONMENT_VARIABLE]

Examples

When the given environment variable is properly defined, the script outputs nothing.

$ defenv PATH
$

But when you've given the script a missing environment variable, an error is issued and the process exits with an error.

$ defenv AWS_SECRET_KEY
**AWS_SECRET_KEY** is not defined