-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
Description
This feature is similar to what cross-emv does.
Sometimes, I want to import variables both from the file and from the command line.
It would be nice if dotenv-cli would be the multiplatform tool to do that.
Proposal
Add new option to load variables from command line. For example -v:
dotenv -e ./config/.env -e ./config/.env.dev -v DB_HOST=localhost -v DB_USER=root -v DB_PASS=root -- node ./scripts/something.js
or maybe just use of single option
dotenv -e ./config/.env -e ./config/.env.dev -v DB_HOST=localhost DB_USER=root DB_PASS=root -- node ./scripts/something.js
dotenv -e ./config/.env -e ./config/.env.dev -v DB_HOST=localhost;DB_USER=root;DB_PASS=root -- node ./scripts/something.js
(Just suggestion, I would prefer most the first way)
Right now the solution would need to use both cross-env and dotenv-cli
cross-env DB_HOST=localhost DB_USER=root DB_PASS=root dotenv -e ./config/.env -e ./config/.env.dev -- node ./scripts/something.js