envalid + dotenv + cli prompts = <3
const envmate, { port, email } = require("envmate");
const env = envmate({
PORT: port(),
EMAIL: email({ default: "admin@example.com" }),
});
It will use variables from .env
or environment. If some are missing it will
ask prompt for missing variables and save them into .env
.