Envelope wraps a shell command with the current environment variables.
I've used it to include all paths when using cron or launchd. Under the hood, it provides an example of using jinja2.
Download or clone this repository and run:
pip install -r requirements.txt
From the directory you extracted to, just run:
python envelope.py <command you want to insert>