steve-a-jones / dotenv-cli

A cli to load dotenv files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotenv-cli

Installing

$ npm install -g dotenv-cli

Usage

$ dotenv <command with arguments>

This will load the variables from the .env file in the current working directory and then run the command (using the new set of environment variables)

Another .env file could be specified using the -e flag:

$ dotenv -e .env2 <command with arguments>

Multiple .env files can be specified, and will be processed in order:

$ dotenv -e .env3 -e .env4 <command with arguments>

If you want to check the value of an environment variable, use the -p argument

$ dotenv -p NODE_ENV

If you want to pass parameters to the command use --. E.g. mvn exec:java -Dexec.args="-g -f" would become dotenv mvn exec:java -- -Dexec.args="-g -f" (See entropitor#8)

License

MIT

About

A cli to load dotenv files

License:MIT License


Languages

Language:JavaScript 100.0%