toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

Options to pass variables via CLI #373

Open kashifchoudhry opened 2 weeks ago

kashifchoudhry commented 2 weeks ago

This is working great when using environment files. However I do have a need where I want to pass env variables in the CLI for example if something like the following could be done, which I would like to use in my package.json script on a windows machine:

env-cmd -p MYVAR=foo playwright test

itsmebasti commented 5 days ago

are you looking for cross-env maybe?