PHPackages                             enjoys/dotenv-writer - 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. enjoys/dotenv-writer

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

enjoys/dotenv-writer
====================

description

0.1.5(1y ago)02.1k↓50%1MITPHPPHP &gt;=8.0

Since Dec 18Pushed 11mo ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (7)Used By (1)

```
$envPath = __DIR__.'/.env';
$dotenvWriter = new \Enjoys\DotenvWriter\DotenvWriter($envPath);
$dotenvWriter->addLine(
    new \Enjoys\Dotenv\Parser\Lines\CommentLine('sdfghj')
);
$dotenvWriter->addLine(
    new \Enjoys\Dotenv\Parser\Lines\EmptyLine()
);

$dotenvWriter->addLine(
    new \Enjoys\Dotenv\Parser\Lines\EnvLine(
        new \Enjoys\Dotenv\Parser\Env\Key('VAR'),
        new \Enjoys\Dotenv\Parser\Env\Value('value'),
        new \Enjoys\Dotenv\Parser\Env\Comment('comment')
    )
);

$dotenvWriter->addLines([
    //...
]);

$dotenvWriter->setEnv('KEY', 'Value', 'Comment')
$dotenvWriter->setEnvIf('KEY', 'newValue', 'conditionValue')
$dotenvWriter->addEnvIfNotExist()
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance49

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Recently: every ~213 days

Total

6

Last Release

394d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25447823?v=4)[enjoys](/maintainers/enjoys)[@enjoys](https://github.com/enjoys)

---

Top Contributors

[![Enjoyzz](https://avatars.githubusercontent.com/u/1448659?v=4)](https://github.com/Enjoyzz "Enjoyzz (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/enjoys-dotenv-writer/health.svg)

```
[![Health](https://phpackages.com/badges/enjoys-dotenv-writer/health.svg)](https://phpackages.com/packages/enjoys-dotenv-writer)
```

###  Alternatives

[thetwelvelabs/techne

Finite State Machine implementation

412.4k](/packages/thetwelvelabs-techne)[microinginer/yii2-dropdown-action-column

1210.1k1](/packages/microinginer-yii2-dropdown-action-column)

PHPackages © 2026

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