@dotenv-run/cli
is a standalone CLI that can be used to run a script with environment variables defined in a .env
file.
install
usage
.env file
Create a .env
file with the following content:
npx dotenv-run
Run dotenv-run
using npx:
command line
Override the value of API_INSTANCE
from the command line:
multiple .env files
Override the value of API_INSTANCE
and API_HOST
from the .env.prod
file:
process.env
Environment variables are available in process.env
:
The list of options is the same as the ones supported by @dotenv-run/core
. Please refer to the API section for more details.