Skip to content

dotenvx/dotenvx.sh

Repository files navigation

curl -sfS https://dotenvx.sh/ | sh

curl -sfS https://dotenvx.sh | sh

dotenvx binary installer

 

Install

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

Usage

$ 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.


more information

  • alternatively, install with wget wget -qO- https://dotenvx.sh/install.sh | sh
  • make sure you are using https, not http. We do not redirect for trust reasons.
  • currently dotenvx.sh is hosted at Heroku