lethalwarrior/esp
Composer 安装命令:
composer require lethalwarrior/esp
包简介
Too lazy to sync your .env? A lethal way to synchronize and purge messy environment files.
README 文档
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
.envwith their default values automatically. - Orphan Purging: Cleans up "ghost" variables that no longer exist in the project template.
- Safety First: Automatically creates a
.env.oldbackup 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:
- Read: It scans your
.env.examplefor the master structure. - Match: It looks for those keys in your current
.env. - Preserve: If a key exists in your local
.env, that value is kept. - Default: If a key is missing locally, it takes the default value from the example file.
- Purge: Any key found in your
.envthat is not in the template is removed to keep things clean.
lethalwarrior/esp 适用场景与选型建议
lethalwarrior/esp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lethalwarrior/esp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lethalwarrior/esp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-05