NotBrianZach / toml-to-env

give me a toml configuration file, I'll give you export MY_ENV=foo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

toml-to-env

provide a TOML configuration file with an environment stanza, and toml-to-env will output the appropriate export commands to configure an enviornment:

export METRICS='127.0.0.1'
export PORT=9200

Use toml-to-env in a shell script like so:

#!/usr/bin/env bash
eval $(toml-to-env /path/to/config.toml)

To unset an environment, do:

#!/usr/bin/env bash
eval $(toml-to-env unset /path/to/config.toml)

License

ISC

About

give me a toml configuration file, I'll give you export MY_ENV=foo

License:ISC License


Languages

Language:JavaScript 100.0%