PHPackages                             rockbuzz/lara-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. rockbuzz/lara-env-sync

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

rockbuzz/lara-env-sync
======================

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

4.0.0(6y ago)0193MITPHPPHP &gt;=7.2.5

Since Aug 25Pushed 4y agoCompare

[ Source](https://github.com/rockbuzz/lara-env-sync)[ Packagist](https://packagist.org/packages/rockbuzz/lara-env-sync)[ RSS](/packages/rockbuzz-lara-env-sync/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (19)Used By (0)

[![Tests](https://github.com/JulienTant/Laravel-Env-Sync/workflows/Tests/badge.svg?branch=master&event=push)](https://github.com/JulienTant/Laravel-Env-Sync/actions?query=branch%3Amaster)[![Scrutinizer](https://camo.githubusercontent.com/2425d1f015ccff50ee2af0851475215ec1730844ccbb9a1f903ecaac8b92ffb5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4a756c69656e54616e742f4c61726176656c2d456e762d53796e632e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/JulienTant/Laravel-Env-Sync/?branch=master)[![Scrutinizer Coverage](https://camo.githubusercontent.com/caf76f9bb49be6166c1c4be2885325c5bba3f9d01473d3ac0126325117615f4e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f4a756c69656e54616e742f4c61726176656c2d456e762d53796e632e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/JulienTant/Laravel-Env-Sync/?branch=master)

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 jtant/laravel-env-sync

```

Then, if you use laravel &lt; 5.5, add the `Jtant\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 `Jtant\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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~76 days

Recently: every ~108 days

Total

18

Last Release

2260d ago

Major Versions

0.2 → 1.0.0-rc12016-08-25

1.4.0 → 2.0.02019-02-27

2.0.0 → 3.0.02019-09-05

3.1.0 → 4.0.02020-03-04

PHP version history (4 changes)1.3.1PHP &gt;=5.6.0

1.3.2PHP &gt;=7.0

2.0.0PHP &gt;=7.1

4.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a5c02aa268a45e5f1d9c67c331503d326eb4b49eb0fb80293dc7379ccef51f7?d=identicon)[rockbuzz](/maintainers/rockbuzz)

---

Top Contributors

[![JulienTant](https://avatars.githubusercontent.com/u/785518?v=4)](https://github.com/JulienTant "JulienTant (70 commits)")[![tiagodevweb](https://avatars.githubusercontent.com/u/15040375?v=4)](https://github.com/tiagodevweb "tiagodevweb (2 commits)")[![rockbuzz-dev](https://avatars.githubusercontent.com/u/48301419?v=4)](https://github.com/rockbuzz-dev "rockbuzz-dev (2 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (1 commits)")[![SiebeVE](https://avatars.githubusercontent.com/u/14889418?v=4)](https://github.com/SiebeVE "SiebeVE (1 commits)")[![sunscreem](https://avatars.githubusercontent.com/u/7523595?v=4)](https://github.com/sunscreem "sunscreem (1 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")[![t1sh0o](https://avatars.githubusercontent.com/u/3911728?v=4)](https://github.com/t1sh0o "t1sh0o (1 commits)")[![tonysm](https://avatars.githubusercontent.com/u/1178621?v=4)](https://github.com/tonysm "tonysm (1 commits)")[![codegain](https://avatars.githubusercontent.com/u/11192306?v=4)](https://github.com/codegain "codegain (1 commits)")[![welcoMattic](https://avatars.githubusercontent.com/u/773875?v=4)](https://github.com/welcoMattic "welcoMattic (1 commits)")[![FatBoyXPC](https://avatars.githubusercontent.com/u/744962?v=4)](https://github.com/FatBoyXPC "FatBoyXPC (1 commits)")[![mathieutu](https://avatars.githubusercontent.com/u/11351322?v=4)](https://github.com/mathieutu "mathieutu (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rockbuzz-lara-env-sync/health.svg)

```
[![Health](https://phpackages.com/badges/rockbuzz-lara-env-sync/health.svg)](https://phpackages.com/packages/rockbuzz-lara-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

245.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)
