I built this package while working on an app that I deployed to production, staging and my local dev environment. I had a couple of scripts (one to deploy, one to migrate the database, etc.) that I wanted to run, but I didn't want to have to maintain one script for each environment doing almost the same but to different endpoints.<p>So, I built a simple CLI that reads one or more .env files and spawns a new child process running an NPM script from the package, with the environment variables extended with the contents of the files.<p>It also supports expansion, where one file use the value defined in another file.<p>Please see the README for more details and usage and consider giving it a spin in your next project if you're faced with a similar problem.
Instead, I highly recommend <a href="https://github.com/casey/just" rel="nofollow">https://github.com/casey/just</a> .<p>Add these two lines to the top to use node executables and load the dotenv:<p>```
set dotenv-load := true
export PATH := "./node_modules/.bin:" + env_var('PATH')
```