aranyasen/laravel-env-sync
A Laravel Artisan package for keeping .env files in sync across environments. Add missing keys from .env.example, compare and merge configuration values, and avoid manually copying variables during deployments or onboarding new developers.
Architecture fit
env:* commands that compare .env keys against .env.example. No runtime request-path footprint if installed as require-dev..env.example and a developer-local, gitignored .env. That is the entire addressable surface..env exists at runtime — the package's core premise does not apply there.Integration feasibility
require-dev plus a CI step. Effort measured in hours, not sprints.Technical risk
@senaranya, now named explicitly in release notes), no external validation of the implementation. v3.0.1 does not move any of these numbers.2026-09-01 last-release date flagged previously remains anomalous relative to the current date and should still be checked directly on Packagist/GitHub (tag integrity, whether it is a backdated or placeholder tag). The new v3.0.1 tag should be verified as the same commit chain as v3.0.0..env parsing. Naive parsers mishandle quoted values containing #, export prefixes, multiline values, variable interpolation (${VAR}), empty values, duplicate keys, and commented-out keys. Any of these produce false drift reports, which erodes trust faster than having no check. The v3.0.1 notes say nothing about parser changes, so this risk is unchanged..env, there is a risk of overwriting local values, reordering entries, or printing secrets into CI logs and build artifacts. Also unaddressed by this release.Key questions
--dry-run? Does it ever echo values rather than keys?export, multiline, empty values, duplicates?.env.testing, .env.ci, .env.example variants per environment?illuminate/support?Stack fit
.env.example convention.config:cache in CI, schema validation of required keys) or a real secret store.Migration path
require-dev, add a composer script and a CI job. Rollback is composer remove with no residual state.env:* namespace before adopting).Compatibility
composer install in production builds where .env is absent — that would turn a dev convenience into a deploy hazard.Sequencing
.env.example in the estate — quoted values, comments, export, empty keys.diff-based Composer script) covers the common case and carries no third-party risk. Given 4 stars and 0 dependents, this is a genuine option, not a formality — a patch release does not change that calculus.v3.0.1, add a non-blocking CI job first, promote to blocking after a week of clean signal, document in the onboarding runbook, and add the dependency to the "pinned/vendor-watch" list.Maintenance
Support
Scaling
Failure modes
.env.example itself is stale — the drift is in the example file, which this tool cannot detect..env without backup, particularly destructive if it reorders or normalizes entries.Ramp-up
Recommendation
require-dev so the vendor risk never reaches runtime.v3.0.1 if adopting or already adopted; do not re-run the full evaluation on the basis of this release, but do carry the still-unanswered parser, write-path, and exit-code questions into the spike.How can I help you explore Laravel packages today?