Advanced

dotenvx genexample directory

Generate a .env.example file inside the specified directory. Useful for monorepos.

$ echo "HELLO=World" > .env
$ mkdir -p apps/backend
$ echo "HELLO=Backend" > apps/backend/.env

$ dotenvx genexample apps/backend
✔ updated .env.example (1)

apps/backend/.env.example

# apps/backend/.env.example
HELLO=""