The command line tool to read, manipulate and update .env files. ## Setup ```bash npm install -g dotenv-tool --registry https://npm.dzienia.pl ``` ## Command Line If input or output file(s) are not specified, `dotenv-tool` will use `stdin` or `stdout` ```bash $ echo -n "VAR1=value1\nVAR2=value2" | dotenv-tool read VAR1 > result.txt $ cat result.txt value1 ``` ### Modify files ```bash $ dotenv-tool -h ``` ``` Usage: dotenv-tool [options] [command] [paramsToSet] Tool to read and update .env files Arguments: paramsToSet space separated list of additional envs to set, in format key=value (default: "") Options: -v, --version output the version number -i, --files Input file(s) -o, --outputFile Output file -m, --modify Modify first input file -s, --silent Mute all messages and errors -h, --help display help for command Commands: get [options] Returns given variable from env file (if specified) ``` ### Read prop from file ```bash $ dotenv-tool get -h ``` ``` Usage: dotenv-tool get [options] Returns given variable from env file (if specified) Arguments: key env variable name a.k.a. key Options: -f, --file Input file to parse (if not given, stdio is used) -h, --help display help for command ```