PHPackages                             muzammal/syncenvvariables - 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. muzammal/syncenvvariables

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

muzammal/syncenvvariables
=========================

A Laravel package to synchronize environment variables from .env.example to .env

1.0.0(1y ago)05MITPHP

Since Nov 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Muzammal01/SyncEnvVariables)[ Packagist](https://packagist.org/packages/muzammal/syncenvvariables)[ RSS](/packages/muzammal-syncenvvariables/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

SyncEnvVariables
================

[](#syncenvvariables)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ebbfe9444c09f26eff97c17025b1d02c6f1d2604a61502e2f4bfbd691bd436c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d757a616d6d616c2f73796e63656e767661726961626c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muzammal/syncenvvariables)[![Total Downloads](https://camo.githubusercontent.com/8bdc31a3918d10257afaeb422a39a408a66882e53e56f2edfda2bb541706f088/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d757a616d6d616c2f73796e63656e767661726961626c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muzammal/syncenvvariables)

**SyncEnvVariables** is a Laravel package designed to help teams keep their `.env` files synchronized with the `.env.example` file. 🔄 By running a simple command, you can automatically update your local `.env` file to include any new environment variables defined in `.env.example`, saving time and reducing configuration errors.

---

✨ Features
----------

[](#-features)

- 📋 **Auto-sync missing environment variables:** Ensures your `.env` file includes all variables listed in `.env.example`.
- 🔄 **Improved team collaboration:** Keeps all developers up-to-date with the latest environment variables.
- 🛠️ **Seamless integration:** Simple to install and use within any Laravel project.

---

🚀 Installation
--------------

[](#-installation)

1. **Install the package via Composer:**

    ```
    composer require muzammal/syncenvvariables
    ```

---

📘 Usage
-------

[](#-usage)

This package provides a `sync:env` Artisan command, which checks your `.env.example` file for any new or missing environment variables and appends them to your `.env` file if they aren’t already present.

### Sync Environment Variables

[](#sync-environment-variables)

Run the following command to sync the environment variables:

```
php artisan sync:env
```

This command will:

- Check your `.env.example` file and compare it to your `.env` file.
- Add any missing variables from `.env.example` to `.env`, keeping your local environment configuration consistent.

---

🔍 Example
---------

[](#-example)

Suppose your `.env.example` file includes new variables such as `API_KEY` and `APP_ENV`. When you run:

```
php artisan sync:env
```

The command will check for any missing variables in your `.env` file and automatically add them. This ensures all developers have the same set of environment configurations across different environments.

---

📜 License
---------

[](#-license)

This package is open-source software licensed under the MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

556d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93006595060e0e69846ac44f8d281496a608089cdc52d0925de0b64d1af785a6?d=identicon)[Muzammal01](/maintainers/Muzammal01)

---

Top Contributors

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

---

Tags

automationenv-syncenvironment-variableslaravelpackagephp

### Embed Badge

![Health badge](/badges/muzammal-syncenvvariables/health.svg)

```
[![Health](https://phpackages.com/badges/muzammal-syncenvvariables/health.svg)](https://phpackages.com/packages/muzammal-syncenvvariables)
```

PHPackages © 2026

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