Generate environment variables from links.

Fixes #91.
I wasn't sure if this should be here, or an argument to `run`.