Skip to content
/ benv Public

A command-line tool synchronize your env var with your bash file.

Notifications You must be signed in to change notification settings

adlayer/benv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Benv (Just a work in progress)

So you want to make your apps compatible with 12 Factors App Manifest, including the thirdy (III) recomendation III. Config ?

The problem

"The twelve-factor app stores config in environment variables"

But what if your app has a lot configuration variables ? What if your server restart and your variables were cleared ?

Benv - A productive way to persist your "env vars"

Many people like to store their variables into files executed by shell on login, in order to always have all variables declared when the server is restarted. Yeah we are talking about .bash_profile, .bash_login, .profile, .bash_rc.

When you change a environment variable your app will be able to read it instantaneously. But if your server goes down and you forgot to change the value in your "bash file" too, when the server reboot your app will be reading the old value of variable.

Export and synchronize your env vars with your "bash file" is not a very productive task. To help you keep it simple we have released this project Benv.

What does it do ?

Benv is a command-line tool that with just one command synchronize your env var with your bash file.

Here is how you can use it:

This simple command will automatically update the "AWS_SECRET_KEY" value in your bash dot file.

# Setting or updating a environment variable
benv set AWS_SECRET_KEY UFmoO5pJrKmL1P9jURuuynU7Mm883tpv
# Applying changes, reload variables in your environment
source ~/.bashrc
# Deleting one variable
benv del AWS_SECRET_KEY
# Applying changes, reload variables in your environment
source ~/.bashrc

About

A command-line tool synchronize your env var with your bash file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages