romanzipp/laravel-env-diff
A Laravel package for comparing .env files side by side, highlighting missing, extra, and mismatched keys so you can spot configuration drift between environments before it causes deployment surprises.
.env drift from .env.example visible before code review or deploy..env, .env.example, and staging variants) rather than only an “additional files” list.--values option / show_values config is a meaningful governance decision. Default is false (existence only), which is the safe default; enabling it turns the tool into a potential secret-leak vector in terminals, screenshots, and CI logs. Product should explicitly decide whether value display is ever permitted and in which environments..env.example, helping keep setup docs accurate and reduce new-engineer setup time..env files, developers frequently hit missing-variable errors, and a local/dev-only visual diff is enough. The path config option now also makes it viable for projects with non-standard env locations (e.g., per-tenant or per-service env directories).additional_files config key is replaced by files, a new path key is introduced, show_values is added, and the command is renamed (now env:diff). Any existing onboarding docs, aliases, or CI scripts referencing the old command or config will silently break. Treat the upgrade as a small migration task, not a drop-in patch.This package is a low-cost developer guardrail: it compares .env files against .env.example so missing configuration is caught earlier, reducing setup friction and avoidable deploy failures. The 2.0 release makes it modestly more capable—it now supports Laravel 7 and PHP 7.4, lets teams point the check at a custom env path, replaces the narrow “additional files” list with a full file list, and renames the command to the clearer env:diff. It also adds an opt-in --values flag to display variable values; that flag should stay off by default outside local machines, since printing secrets into terminals or CI logs is a real risk.
For executives, the pitch is improved release reliability and faster onboarding with minimal investment; for engineering, it is a dev-only utility that can be trialed quickly and removed easily. Two caveats should be stated plainly. First, 2.0 is a breaking change—config keys and the command name moved—so any existing usage needs a short, scheduled migration rather than an incidental upgrade. Second, maturity: adoption is still minimal, and while the new release shows the project is not abandoned, it targets Laravel 7 / PHP 7.4, both now out of support. Position it as a lightweight experiment or reference implementation, not a long-term platform dependency. If the workflow proves valuable, product and engineering should fund a small internal replacement or CI check—and if --values proves useful, that internal version is the right place to add secret-redaction and environment gating.
How can I help you explore Laravel packages today?