PHPackages                             eliurkis/laravel-env-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. eliurkis/laravel-env-sync

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eliurkis/laravel-env-sync
=========================

A package that makes sure that your .env file is in sync with your .env.example

1.2.0(5y ago)01.5kMITPHPPHP &gt;=7.3

Since Feb 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/eliurkis/laravel-env-sync)[ Packagist](https://packagist.org/packages/eliurkis/laravel-env-sync)[ RSS](/packages/eliurkis-laravel-env-sync/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (8)Versions (4)Used By (0)

[![Tests](https://github.com/senaranya/Laravel-Env-Sync/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/senaranya/Laravel-Env-Sync/actions?query=branch%3Amaster)[![Scrutinizer](https://camo.githubusercontent.com/f8a185dca75b96083cc1da0dd7631aea6f796ddc18dad3b244458502a5181b8f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73656e6172616e79612f4c61726176656c2d456e762d53796e632e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/senaranya/Laravel-Env-Sync/?branch=master)[![Scrutinizer coverage](https://camo.githubusercontent.com/8b99eebe24d3ebb09e531f325106c6988923a1c366917f28207affc6f737b898/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73656e6172616e79612f4c61726176656c2d456e762d53796e633f7374796c653d706c6173746963)](https://camo.githubusercontent.com/8b99eebe24d3ebb09e531f325106c6988923a1c366917f28207affc6f737b898/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73656e6172616e79612f4c61726176656c2d456e762d53796e633f7374796c653d706c6173746963)

Laravel Env Sync
================

[](#laravel-env-sync)

Keep your .env in sync with your .env.example or vice versa.

It reads the .env.example file and makes suggestions to fill your .env accordingly.

Installation via Composer
-------------------------

[](#installation-via-composer)

Start by requiring the package with composer

```
composer require eliurkis/laravel-env-sync

```

Then, if you use laravel &lt; 5.5, add the `Eli\LaravelEnvSync\EnvSyncServiceProvider::class` service provider to your `config/app.php` file, and that's it

Usage
-----

[](#usage)

### Sync your envs files

[](#sync-your-envs-files)

You can populate your .env file from the .env.example by using the `php artisan env:sync` command.

The command will tell you if there's anything not in sync between your files and will propose values to add into the .env file.

You can launch the command with the option `--reverse` to fill the .env.example file from the .env file

You can also use `--src` and `--dest` to specify which file you want to use. You must use either both flags, or none.

If you use the `--no-interaction` flag, the command will copy all new keys with their default values.

### Check for diff in your envs files

[](#check-for-diff-in-your-envs-files)

You can check if your .env is missing some variables from your .env.example by using the `php artisan env:check` command.

The command simply show you which keys are not present in your .env file. This command will return 0 if your files are in sync, and 1 if they are not, so you can use this in a script

Again, you can launch the command with the option `--reverse` or with `--src` and `--dest`.

The command will also dispatch event `Eli\LaravelEnvSync\Events\MissingEnvVars`, which will contain the missing env variables, which could be used in automatic deployments. Event is only fired when there are missing env variables.

### Show diff between your envs files

[](#show-diff-between-your-envs-files)

You can show a table that compares the content of your env files by using the `php artisan env:diff` command.

The command will print a table that compares the content of both .env and .env.example files, and will highlight the missing keys.

You can launch the command with the options `--src` and `--dest`.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1923d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbbc49241b2231fd86bed0a5a8d8e5dd8b3209b542fc8b0ca965b58b8034d554?d=identicon)[eliurkis](/maintainers/eliurkis)

---

Top Contributors

[![eliurkis](https://avatars.githubusercontent.com/u/59236?v=4)](https://github.com/eliurkis "eliurkis (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eliurkis-laravel-env-sync/health.svg)

```
[![Health](https://phpackages.com/badges/eliurkis-laravel-env-sync/health.svg)](https://phpackages.com/packages/eliurkis-laravel-env-sync)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
