https://github.com/dotenvx/dotenvx.sh
install `dotenvx` via curl
https://github.com/dotenvx/dotenvx.sh
Last synced: 8 months ago
JSON representation
install `dotenvx` via curl
- Host: GitHub
- URL: https://github.com/dotenvx/dotenvx.sh
- Owner: dotenvx
- Created: 2023-11-24T22:23:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-25T18:25:45.000Z (over 1 year ago)
- Last Synced: 2025-02-06T14:51:21.194Z (over 1 year ago)
- Language: Shell
- Homepage: https://dotenvx.sh
- Size: 190 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

```sh
curl -sfS https://dotenvx.sh | sh
```
> [`dotenvx`](https://github.com/dotenvx/dotenvx#readme) binary installer
>
> * [see usage](https://github.com/dotenvx/dotenvx#readme)
## Install
```sh
curl -sfS https://dotenvx.sh | sh
```
or self-execute this file:
```sh
curl -sfS https://dotenvx.sh > install.sh
chmod +x install.sh
./install.sh
```
more install examples:
```sh
# 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
```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
```
see [`dotenvx`](https://github.com/dotenvx/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](https://dotenvx.sh) is hosted at Heroku