0.1.0 • Published 5 years ago
modenv v0.1.0
Installation
npm install -g modenv
A script to modify environment files.
To use on a dotenv like environment file :
MYVAR=1
MYSECONDVAR=yes
...
Usage
modenv --file=${path_to_env_file} MYVAR=10 MYSECONDVAR=cocorico REMOVETHISVAR=
Choose environment file
Specify the environment file with
modenv --file=${path_to_env_file}
//--file should be the first parameter of the command
Add/modify variable
Just add MYVAR=${variable_value} to add or modify MYVAR
modenv MYVAR=10 MYSECONDVAR=cocorico
//adds/modifies MYVAR to 10 and MYSECONDVAR to cocorico in the '.env' file (no --file parameter)
Remove variable
Just add REMOVETHISVAR= without nothing after the equals sign to remove a variable from you env file
modenv --file=.customenv REMOVETHISVAR=
//removes REMOVETHISVAR from the environment file .customenv