curl -sfS https://dotenvx.sh | sh
dotenvx
binary installer
curl -sfS https://dotenvx.sh | sh
or self-execute this file:
curl -sfS https://dotenvx.sh > install.sh
chmod +x install.sh
./install.sh
more install examples:
# curl examples
curl -sfS "https://dotenvx.sh/" | sudo sh
curl -sfS "https://dotenvx.sh/?version=0.44.0" | sh
curl -sfS "https://dotenvx.sh/?directory=." | sh
curl -sfS "https://dotenvx.sh/?directory=/custom/path&version=0.44.0" | sh
# self-executing examples
./install.sh --version=0.44.0
./install.sh --directory=.
./install.sh --directory=/custom/path --version=0.44.0
./install.sh --help
$ echo "HELLO=World" > .env
$ echo "console.log('Hello ' + process.env.HELLO)" > index.js
$ node index.js
Hello undefined # without dotenvx
$ dotenvx run -- node index.js
Hello World # with dotenvx
see dotenvx
for extended usage guides.
- alternatively, install with wget
wget -qO- https://dotenvx.sh/install.sh | sh
- make sure you are using
https
, nothttp
. We do not redirect for trust reasons. - currently dotenvx.sh is hosted at Heroku