dotenv-shell-loader is a simple shell script that defines a function (dotenv
) to load environment variables from .env
to use them in your shell.
-
Clone this repo and load
dotenv-shell-loader.sh
.$ git clone git@github.com:builtinnya/dotenv-shell-loader.git $ source dotenv-shell-loader/dotenv-shell-loader.sh $ # You probably want to load the script at shell startup
-
Execute
dotenv
in a directory which contains.env
file to load environment variables.$ cd /path/to/somewhere $ dotenv
Copyright © 2016-present Naoto Yokoyama
Distributed under the WTFPL license. See the LICENSE file for full details.