As simple as:
npm install @b1kt0p/dotenv-generator
or
yarn add @b1kt0p/dotenv-generator
@b1kt0p/dotenv-generator has been built to work by default from Node >= 8.10.
If you need to run it in earlier versions of Node (eg. 4.3) then you will have to transpile dotenv-generator's code yourself using babel or a similar tool.
dotenv-generator --source template.env
MIT © Victor Savostin