PHPackages                             aranyasen/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. aranyasen/laravel-env-sync

ActiveLibrary

aranyasen/laravel-env-sync
==========================

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

v2.0.2(1y ago)416.8k↓38.2%1[1 PRs](https://github.com/senaranya/Laravel-Env-Sync/pulls)MITPHPPHP &gt;=8.1

Since Oct 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/senaranya/Laravel-Env-Sync)[ Packagist](https://packagist.org/packages/aranyasen/laravel-env-sync)[ RSS](/packages/aranyasen-laravel-env-sync/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (10)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 aranyasen/laravel-env-sync

```

Usage
-----

[](#usage)

### Sync your dotenv files

[](#sync-your-dotenv-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 dotenv files

[](#check-for-diff-in-your-dotenv-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 `Aranyasen\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 dotenv files

[](#show-diff-between-your-dotenv-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

40

—

FairBetter than 88% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~168 days

Recently: every ~209 days

Total

9

Last Release

692d ago

Major Versions

v0.0.2 → 1.0.02020-12-19

v0.0.3 → v1.0.22022-03-13

v1.0.2 → v2.0.02023-02-28

PHP version history (2 changes)v0.0.1PHP &gt;=7.4

v2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/16dd57009f577d06da0eb45b9020ed46e7da99b2e26eda5dde49da9f74e66612?d=identicon)[senaranya](/maintainers/senaranya)

---

Top Contributors

[![senaranya](https://avatars.githubusercontent.com/u/5471894?v=4)](https://github.com/senaranya "senaranya (9 commits)")[![edwinheij](https://avatars.githubusercontent.com/u/1799101?v=4)](https://github.com/edwinheij "edwinheij (1 commits)")

---

Tags

difflaraveldotenvsync

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

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

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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