Pro 🏆
Install
Install dotenvx pro
where you need it.
npm install @dotenvx/dotenvx-pro --save
npx dotenvx pro help
Npm
dotenvx pro
is made with javascript – so you can use it just like you use dotenv
– as a drop-in replacement.
npm install @dotenvx/dotenvx-pro --save
// index.js
require('@dotenvx/dotenvx-pro').config()
// or import '@dotenvx/dotenvx-pro/config' if you're using esm
console.log(`Hello ${process.env.HELLO}`)
Brew
Installing with brew is the most straight forward global install:
# install with Homebrew and then use the dotenvx command
brew install dotenvx/brew/dotenvx-pro
Find the dotenvx brew tap here.
Shell
After brew our install.sh script is easiest. With curl:
curl -sfS https://dotenvx.sh/pro | sh
Or with wget:
wget -qO- https://dotenvx.sh/pro | sh
Read the install.sh script here.
GitHub Releases
You can also download straight from GitHub Releases.
curl -L -o dotenvx-pro.tar.gz "https://github.com/dotenvx/dotenvx-pro/releases/latest/download/dotenvx-pro-$(uname -s)-$(uname -m).tar.gz"
tar -xzf dotenvx-pro.tar.gz
./dotenvx-pro help
If you download manually you'll need to move the binary somewhere in your PATH.
Windows
Download the windows executable directly from the releases page.
(unzip to extract dotenvx-pro.exe
)
Standalone
dotenvx-pro
is a standalone binary, so (if you want) you can just download it directly:
# download it to `./dotenvx-pro`
curl -sfS --proto '=https' https://dotenvx.sh/pro/$(uname)/$(uname -m).tgz | tar xz
# install it to `/usr/local/bin/dotenvx-pro`
sudo install -m 755 dotenvx-pro /usr/local/bin
# check it works
dotenvx-pro help
Download a specific version:
# download version 0.6.9
curl -sfS --proto '=https' "https://dotenvx.sh/pro/$(uname)/$(uname -m).tgz?version=v0.6.9" | tar xz
# check the version
./dotenvx-pro --version
Npm local
Use dotenvx locally as a cli in your node project.
npm i @dotenvx/dotenvx-pro --save
{
"scripts": {
"start": "./node_modules/.bin/dotenvx-pro run -- node index.js"
},
"dependencies": {
"@dotenvx/dotenvx-pro": "^0.6.0"
}
}
Npm global
You can also install globally using npm's --global
flag.
npm install @dotenvx/dotenvx-pro --global
dotenvx-pro help
Npx
Or prefer to run as needed, uses npx
.
npx @dotenvx/dotenvx-pro help