diff --git a/README.md b/README.md index 1d1fe52..8001175 100644 --- a/README.md +++ b/README.md @@ -20,20 +20,26 @@ pnpm add -g dotenv-cli ## Usage ```bash -$ dotenv +$ dotenv -- ``` 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). +Alternatively, if you do not need to pass arguments to the command, you can use the shorthand: + +```bash +$ dotenv +``` + ### Custom .env files Another .env file could be specified using the -e flag: ```bash -$ dotenv -e .env2 +$ dotenv -e .env2 -- ``` Multiple .env files can be specified, and will be processed in order: ```bash -$ dotenv -e .env3 -e .env4 +$ dotenv -e .env3 -e .env4 -- ``` ### Cascading env variables @@ -48,12 +54,12 @@ dotenv -e ../.env -c ### Setting variable from command line It is possible to set variable directly from command line using the -v flag: ```bash -$ dotenv -v VARIABLE=somevalue +$ dotenv -v VARIABLE=somevalue -- ``` Multiple variables can be specified: ```bash -$ dotenv -v VARIABLE1=somevalue1 -v VARIABLE2=somevalue2 +$ dotenv -v VARIABLE1=somevalue1 -v VARIABLE2=somevalue2 -- ``` Variables set up from command line have higher priority than from env files.