Set single environment variable
Set a single environment variable value.
Quick Usage
dotenvx set HELLO World
Sets a single environment variable for your .env
file.
Usage
Given you have a .env
file like this:
# .env
HELLO="World"
Simply run dotenvx set HELLO Universe
.
$ dotenvx set HELLO Universe
set HELLO (.env)
Check your .env
file and it will now be set as HELLO="Universe"
HELLO="Universe"
Set a different file.
Or set .env.production
.
# .env.production
HELLO="production"
$ dotenvx set HELLO Universe -f .env.production
set HELLO (.env.production)
The result will be:
# .env.production
HELLO="Universe"
Set multiple files at the same time.
$ dotenvx set HELLO Universe -f .env -f .env.production
set HELLO (.env, .env.production)
To see a list of all options available:
$ dotenvx get --help
That's it!