Package Exports
- validate-env-vars
Readme
validate-env-vars
A lightweight utility to check an .env file for the presence and validity of environment variables, as specified via a template file or the command line
Installation
Using npm:
npm install validate-env-vars --save-dev
Usage
Check your .env file against every required variable in your template file:
validate-env-vars --template .env.template
Check your .env file against a list of required variables:
validate-env-vars --list VAR1,VAR2,VAR3
Check a specific .env file:
validate-env-vars --env .env.local --template .env.template
Arguments
Argument | Description |
---|---|
-t <file> --template <file> |
Path to template file to check against. Optional variables can be specified with # optional suffix.Either --template or --list must be specified. |
-l <vars> --list <vars> |
Comma-separated list of required variables to check for. Either --template or --list must be specified. |
-e <file> --env <file> |
Path to .env file to check. Defaults to .env in current directory. |