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

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

k-adam/env-editor
=================

.env editor library

2.0.0(3y ago)57.7k↓50%3MITPHPPHP &gt;=8.0CI failing

Since Mar 28Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)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 k-adam/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

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~798 days

Total

2

Last Release

1444d ago

Major Versions

1.0.0 → 2.0.02022-06-05

PHP version history (2 changes)1.0.0PHP ^7.2

2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa3231893f2862d58a369469a9d0c5383f26978556d10a01cec124860d5a8f54?d=identicon)[k-adam](/maintainers/k-adam)

---

Top Contributors

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

---

Tags

dotenvdotenv-parserenvenv-editorenvironment-variablesphpenvdot envenv-editorenv-phpenv-loaderenv-writer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/k-adam-env-editor/health.svg)](https://phpackages.com/packages/k-adam-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.3k](/packages/symfony-dotenv)[helhum/dotenv-connector

Makes it possible to set environment variables for composer projects.

1594.6M34](/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)
