Change Hooks

To take an action when an environment changes, you can use envkey-source like this:

$ envkey-source -r ./

Or use the es alias:

$ es -r ./

Now every time the environment is updated, your script will be run with the new environment. The environment variable __ENVKEY_UPDATED will be set to a comma-delimited list of variables that changed in the latest update so you can take action based on what changed. The previous value of any variable that changed will also be set to __PREV_[VARIABLE_NAME].

Did this page help you?