Introducing dotenv-merge
Dotenv::Merge combines .env files by variable name instead of treating every line as unrelated text. It accounts for comments, blank lines, exports, and protected regions. Its parser is registered through TreeHaver’s line backend, making it part of the same merge pipeline as the other StructuredMerge formats.
Read the upstream README for installation and usage, or browse the project repository.