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!
- Unix Pass via
unix-pass://
- Curl via
curl-http://
orcurl-https://
- From a file via
load-file://
- From another shell command via
exec://
N.B. Results are trim
ed
> 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...