Advanced

dotenvx ext 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 ext genexample -f .env -f .env.production
✔ updated .env.example (2)

.env.example

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