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

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

gaming-engine/dotenv-writer
===========================

Dot Env File Writer

1.0.1(4y ago)1292↓91.7%1MITPHPPHP ^8.0|^8.1CI failing

Since Oct 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/gaming-engine/dotenv-writer)[ Packagist](https://packagist.org/packages/gaming-engine/dotenv-writer)[ Docs](https://github.com/gaming-engine/dotenv-writer)[ RSS](/packages/gaming-engine-dotenv-writer/feed)WikiDiscussions main Synced 3w ago

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

DotEnv Writer
=============

[](#dotenv-writer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/599f71eb3e1a1baa5f156ba510f1bef4ebf302f2d1d8545afb290ee974f260c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67616d696e672d656e67696e652f646f74656e762d7772697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gaming-engine/dotenv-writer)[![Total Downloads](https://camo.githubusercontent.com/f7ff55cf28d9ea6070a39f118efa226017447053aa8da972c28bfb2fefea5c97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67616d696e672d656e67696e652f646f74656e762d7772697465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gaming-engine/dotenv-writer)[![GitHub Actions](https://github.com/gaming-engine/dotenv-writer/actions/workflows/main.yml/badge.svg)](https://github.com/gaming-engine/dotenv-writer/actions/workflows/main.yml/badge.svg)

A quick and easy way to modify your `.env` files programmatically.

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

[](#installation)

You can install the package via composer:

```
composer require gaming-engine/dotenv-writer
```

Usage
-----

[](#usage)

```
use GamingEngine\DotEnv\Writer;

(new Writer())
    ->load(__DIR__.'./.env') // Loads an existing file
    ->setValue('config', 'hello') // Overrides the value
    ->write(__DIR__.'./.env'); // Writes it back out to disk
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Andrew Judd](https://github.com/gaming-engine)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Total

2

Last Release

1716d ago

### Community

Maintainers

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

---

Top Contributors

[![awjudd](https://avatars.githubusercontent.com/u/1910996?v=4)](https://github.com/awjudd "awjudd (5 commits)")

---

Tags

dotenvenvironmentenvironment-variablesphpenvironmentenvdotenvgaming-engine

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[vlucas/phpdotenv

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

13.5k627.3M6.1k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k237.6M2.6k](/packages/symfony-dotenv)[bnomei/kirby3-dotenv

Kirby Plugin for environment variables from .env

4147.7k1](/packages/bnomei-kirby3-dotenv)[nystudio107/dotenvy

Speed up your production sites by ditching .env for key/value variable pairs as Apache, Nginx, and shell equivalents.

316.9k](/packages/nystudio107-dotenvy)[diarmuidie/envpopulate

Tool to interactively populate a `.env` file based on an `.env.example` file whenever Composer installs or updates.

1694.6k](/packages/diarmuidie-envpopulate)[beebmx/kirby-env

Enable env variables to Kirby

2139.6k2](/packages/beebmx-kirby-env)

PHPackages © 2026

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