
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
Run a command using environment variables declared in a file.
Envrun mimics the behavior of Foreman but applied to running arbitrary commands
rather than processes declared in a Procfile. By default, envrun reads
environment variables from a file called .env and adds a PORT variable set
to 3000. If you haven't guessed, I use this for running Node.js scripts and
services on my development machine.
Install with npm install envrun -g.
The basic form takes a command to be executed and reads the environment variables from .env:
$ envrun my-script.sh
You can provide arguments to the command:
$ envrun node my-utility.js
You can override the default PORT value with -p:
$ envrun -p node server.js
You can of course specify a different environment file with -e:
$ envrun -e remote-dev.env node my-utility.js
A value provided by -p takes precedence over a PORT value from the
environment file, which takes precendence over the default value of 3000.
If you want to include the calling environment's PATH, then use the --path flag:
$ envrun --path mocha
You can confirm what's going on with your OS's env command:
$ envrun env
DATABASE="my_dev_db"
S3_KEY=sodif7s297ydh297yh92
NAME="My Full Name" # Comments are OK
# The line below will get ignored
#LOGGING=QUIET
FAQs
Run commands using specified environment variables
We found that envrun demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.