Skip to content

parse .env file and set environment variables in shell

License

Notifications You must be signed in to change notification settings

zhiyelee/dotenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

dotenv

parse .env file and set environment variable in shell

Install

# put in bin folder of current user if you have bin folder in your $PATH
curl https://raw.githubusercontent.com/zhiyelee/dotenv/master/dotenv.sh > ~/bin/dotenv

# or /usr/local/bin to share with multiple users
curl https://raw.githubusercontent.com/zhiyelee/dotenv/master/dotenv.sh > /usr/local/bin/dotenv

# grant all users execution permissions
chmod a+x /usr/local/bin/dotenv

Usage

dotenv run_my_command --any-option option1 param1 param2

How It Works

Suppose we have an .env file like

# `#` started comment will be ignored
USERNAME=zhiye
# space and quote will be reserved
ORGANIZATION="TUBI TV"
TEAM=WEB

dotenv python app.py

equals to

USENAME=zhiye ORGANIZATION="TUBI TV" TEAM=WEB python app.py

LICENSE

ISC

About

parse .env file and set environment variables in shell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages