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

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

envatic/env
===========

.env editor library

1.0.2(3y ago)05MITPHPPHP ^8.1

Since Mar 28Pushed 3y agoCompare

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

READMEChangelogDependencies (1)Versions (4)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 envatic/env

```

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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~393 days

Total

3

Last Release

1456d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.0.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ae46353bef6d675058d4f95bbb2abe5352729635fc0b35a912a5a18622359c8?d=identicon)[envatic](/maintainers/envatic)

---

Top Contributors

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

---

Tags

envdot envenv-editorenv-phpenv-loaderenv-writer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
