Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.02 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.02 KB

dotenv

A small command tool line that loads enviroment variables from a file and executes a command.

why?

There were others, but they all had dependencies (ruby, node).

Usage

dotenv command [arg ...]:
  -file string
    	file to load variables from (default ".env")

Example

$ cat .env
SECRET=VALUE
$ env | grep SECRET
$ dotenv env | grep SECRET
SECRET=VALUE

Instalation

Grab the latest binary and put it somewhere in your $PATH

curl -L https://github.com/pcasaretto/dotenv/releases/download/v1.0.4/dotenv-`uname -s`-`uname -m` -o /usr/local/bin/dotenv && chmod +x /usr/local/bin/dotenv

If you receive a permission error, you might need sudo

sudo curl -L https://github.com/pcasaretto/dotenv/releases/download/v1.0.4/dotenv-`uname -s`-`uname -m` -o /usr/local/bin/dotenv && sudo chmod +x /usr/local/bin/dotenv

Using nix flakes

nix shell github:pcasaretto/dotenv

Will give you a shell with dotenv ready to rock.