dotenvx
a better dotenv–from the creator of `dotenv`
README
a better dotenv–from the creator of [dotenv](https://github.com/motdotla/dotenv).
run anywhere (cross-platform)
multi-environment
encrypted envs
Quickstart
Install and use it in code just like dotenv.
- ```sh
- npm install @dotenvx/dotenvx --save
- ```
- ```js
- // index.js
- require('@dotenvx/dotenvx').config()
- console.log(`Hello ${process.env.HELLO}`)
- ```
or install globally - unlocks dotenv for any language, framework, or platform!
with brew 🍺
- ```sh
- brew install dotenvx/brew/dotenvx
- dotenvx help
- ```
with curl 🌐
- ```sh
- curl -sfS https://dotenvx.sh | sh
- dotenvx help
- ```
with docker 🐳
- ```sh
- docker run -it --rm -v $(pwd):/app dotenv/dotenvx help
- ```
or with github releases 🐙
- ```sh
- curl -L -o dotenvx.tar.gz "https://github.com/dotenvx/dotenvx/releases/latest/download/dotenvx-$(uname -s)-$(uname -m).tar.gz"
- tar -xzf dotenvx.tar.gz
- ./dotenvx help
- ```
includes homebrew installs
Run Anywhere
- ```sh
- $ 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
- > :-D
- ```