PHPackages                             nhanchaukp/env-editor - 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. nhanchaukp/env-editor

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

nhanchaukp/env-editor
=====================

.env editor library

2.0.0(3y ago)04MITPHPPHP &gt;=7.4

Since Dec 7Pushed 3y agoCompare

[ Source](https://github.com/nhanchaukp/php-env-editor)[ Packagist](https://packagist.org/packages/nhanchaukp/env-editor)[ RSS](/packages/nhanchaukp-env-editor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP .env editor
===============

[](#php-env-editor)

A `.env` file editor library for PHP.

Installation
------------

[](#installation)

Using [Composer](http://getcomposer.org/):

```
composer require nhanchaukp/env-editor

```

Usage example
-------------

[](#usage-example)

```
$envFile = \EnvEditor\EnvFile::loadFrom(__DIR__."/.env.example");

$envFile->setValue("exampleKey", "exampleValue");
$envFile->setValue("LOG_DIR", __DIR__."/logs");
// ...

$envFile->saveTo(__DIR__."/.env");
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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

1249d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4d66c3eac929e6b2c86ff9dc13f7fb05c431d956db07fbe58014f6daf8f55fc?d=identicon)[nhanchaukp](/maintainers/nhanchaukp)

---

Top Contributors

[![K-Adam](https://avatars.githubusercontent.com/u/9156245?v=4)](https://github.com/K-Adam "K-Adam (14 commits)")[![nhanchaukp](https://avatars.githubusercontent.com/u/16833818?v=4)](https://github.com/nhanchaukp "nhanchaukp (2 commits)")

---

Tags

envdot envenv-editorenv-phpenv-loaderenv-writer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nhanchaukp-env-editor/health.svg)

```
[![Health](https://phpackages.com/badges/nhanchaukp-env-editor/health.svg)](https://phpackages.com/packages/nhanchaukp-env-editor)
```

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.2k](/packages/symfony-dotenv)[helhum/dotenv-connector

Makes it possible to set environment variables for composer projects.

1594.6M33](/packages/helhum-dotenv-connector)[oscarotero/env

Simple library to consume environment variables

9411.4M152](/packages/oscarotero-env)[ffraenz/private-composer-installer

A composer install helper for private packages

2331.7M5](/packages/ffraenz-private-composer-installer)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)

PHPackages © 2026

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