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

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/lethalwarrior/esp

v1.0.1 2026-02-05 03:11 UTC

This package is auto-updated.

Last update: 2026-02-05 03:12:55 UTC


README

"Too lazy to synchronize your .env manually? Let E.S.P. 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.?

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

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

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

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.