Advanced

dotenvx genexample -f

Pass multiple .env files to generate your .env.example file from the combination of their contents.

$ echo "HELLO=World" > .env
$ echo "DB_HOST=example.com" > .env.production

$ dotenvx genexample -f .env -f .env.production
✔ updated .env.example (2)

.env.example

# .env.example
HELLO=""
DB_HOST=""