Skip to content

Latest commit

 

History

History

envx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

envx

This is a small utility to allow loading environment variables (possibly invoking programs) and pop a command into a new shell with the newly fetched environment variables.

It uses x:// style protocols to perform io operations on a provided value, where x:// has been chosen not to conflict with existing protocols and be a little more explicit.

NOTE: Make sure you trust the envx.edn file you're running!

Supported "Protocols"

  • Unix Pass via unix-pass://
  • Curl via curl-http:// or curl-https://
  • From a file via load-file://
  • From another shell command via exec://

N.B. Results are trimed

Example

> echo '{"APP_PASSWORD" "unix-pass://app/password"
         "APP_CONFIG" "curl-https://www.appconfig.com/config"}' > envx.edn
> envx env
> ...
  APP_PASSWORD=xyz
  APP_CONFIG={"x": 1}
> envx app
  Password OK...
  Config OK...