PHPackages                             lethalwarrior/esp - 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. lethalwarrior/esp

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

lethalwarrior/esp
=================

Too lazy to sync your .env? A lethal way to synchronize and purge messy environment files.

v1.0.1(4mo ago)04[1 issues](https://github.com/LethalWarrior/esp/issues)MITPHPPHP &gt;=7.4

Since Feb 5Pushed 4mo agoCompare

[ Source](https://github.com/LethalWarrior/esp)[ Packagist](https://packagist.org/packages/lethalwarrior/esp)[ RSS](/packages/lethalwarrior-esp/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

E.S.P. (Environment Syncing &amp; Purge) 🛡️
===========================================

[](#esp-environment-syncing--purge-️)

### **"Too lazy to synchronize your .env manually? Let E.S.P. do the dirty work."**

[](#too-lazy-to-synchronize-your-env-manually-let-esp-do-the-dirty-work)

E.S.P. is a lightweight CLI utility built for developers who want a clean project structure without the manual chore. It keeps your local environment perfectly aligned with your `.env.example` template—adding what's missing, preserving what's yours, and purging what's junk.

---

🚀 Why E.S.P.?
-------------

[](#-why-esp)

In a fast-paced team, `.env.example` files change constantly. Manually tracking down missing keys or deleting old ones is a waste of your coding time.

- **Zero-Leak Security:** Terminal reports only show keys. Your sensitive passwords and tokens stay hidden.
- **Auto-Injection:** New keys in the template? E.S.P. adds them to your `.env` with their default values automatically.
- **Orphan Purging:** Cleans up "ghost" variables that no longer exist in the project template.
- **Safety First:** Automatically creates a `.env.old` backup before any write operation.
- **PHP 7.4+ Optimized:** Designed to work smoothly in both legacy and modern PHP environments.

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require lethalwarrior/esp
```

If you want to use it across all your projects in your workstation, install it globally:

```
composer global require lethalwarrior/esp
```

---

🛠️ Usage
--------

[](#️-usage)

Simply run the command from your project root:

```
php vendor/bin/esp
```

**Available Flags**

**Flag****Function**`--dry-run`**The safety net.** Shows you exactly what would change without modifying files.`--no-backup`Skips the creation of `.env.old` file---

📈 How it works
--------------

[](#-how-it-works)

E.S.P. follows a "Template-First" philosophy:

1. Read: It scans your `.env.example` for the master structure.
2. Match: It looks for those keys in your current `.env`.
3. Preserve: If a key exists in your local `.env`, that value is kept.
4. Default: If a key is missing locally, it takes the default value from the example file.
5. Purge: Any key found in your `.env` that is not in the template is removed to keep things clean.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance73

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Every ~0 days

Total

2

Last Release

149d ago

PHP version history (2 changes)v1.0.0PHP ^7.4

v1.0.1PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21117517?v=4)[Robby Auziqni](/maintainers/LethalWarrior)[@LethalWarrior](https://github.com/LethalWarrior)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lethalwarrior-esp/health.svg)

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

PHPackages © 2026

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