PHPackages                             rodas/dotenvx - 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. rodas/dotenvx

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

rodas/dotenvx
=============

Dotenvx encryption for PHP

v1.0.0(9mo ago)032[2 PRs](https://github.com/Marqitos/php-dotenvx/pulls)BSD-3-ClausePHPPHP &gt;=8.4CI passing

Since Nov 6Pushed 6mo agoCompare

[ Source](https://github.com/Marqitos/php-dotenvx)[ Packagist](https://packagist.org/packages/rodas/dotenvx)[ RSS](/packages/rodas-dotenvx/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (5)Versions (10)Used By (0)

PHP dotenvx
===========

[](#php-dotenvx)

Plaintext `.env` files have been a major attack vector, but they've also been undeniably useful.

[A secure dotenv (dotenvx.com)](https://dotenvx.com/)

> "Dotenvx: Reducing Secrets Risk with Cryptographic Separation
>
> Abstract. An ideal secrets solution would not only centralize secrets but also contain the fallout of a breach. While secrets managers offer centralized storage and distribution, their design creates a large blast radius, risking exposure of thousands or even millions of secrets. We propose a solution that reduces the blast radius by splitting secrets management into two distinct components: an encrypted secrets file and a separate decryption key.
>
> ..."
>
> [Read the whitepaper](https://github.com/Marqitos/php-dotenvx/blob/main/docs/dotenvx.pdf)

Dotenvx decrypts your `.env` files. Using with cryptographic separation limiting their attack vector while retaining their benefits. Allowing use in small projects, on virtual servers, where it is not possible to run an external startup script for the application.

Important

But for this to be effective, the decryption keys (private key) and the application must be in separate environments, while maintaining security in each environment.

[![BSD 3-Clause License](https://camo.githubusercontent.com/7d1247b7b4bfc85d8b18aa1b592523976175ca614854258dc82672c59bec7064/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d425344253230332d2d436c617573652d627269676874677265656e2e737667)](https://github.com/Marqitos/php-dotenvx?tab=BSD-3-Clause-1-ov-file)[![Latest Version](https://camo.githubusercontent.com/79b750bc04e819562c8a32d0843509b837b7a10ade264cd7390bdf333cc3f2c1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d61727169746f732f7068702d646f74656e76782e737667)](https://github.com/Marqitos/php-dotenvx/releases)[![Run unit tests (PHPUnit)](https://github.com/Marqitos/php-dotenvx/actions/workflows/test-unit.yml/badge.svg)](https://github.com/Marqitos/php-dotenvx/actions/workflows/test-unit.yml)

[![dotvenx](https://github.com/Marqitos/php-dotenvx/raw/main/docs/dotenvx-cover.svg)](https://github.com/Marqitos/php-dotenvx/blob/main/docs/dotenvx-cover.svg)

This library also provides an adapter to dump the `.env` values ​​into an array and a multi-level array.

How to use
----------

[](#how-to-use)

See [the documentation](https://github.com/Marqitos/php-dotenvx/blob/main/docs/quickstart.md).

---

Under the hood, this is all implemented using the same public-key cryptography as [Bitcoin](https://en.bitcoin.it/wiki/Secp256k1).

---

📦 Available at Packagist: [rodas/dotenvx](https://packagist.org/packages/rodas/dotenvx)

[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/Marqitos/php-dotenvx)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance62

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

4

Last Release

258d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1794548?v=4)[Marcos Porto Mariño](/maintainers/marqitos)[@Marqitos](https://github.com/Marqitos)

---

Top Contributors

[![Marqitos](https://avatars.githubusercontent.com/u/1794548?v=4)](https://github.com/Marqitos "Marqitos (68 commits)")

---

Tags

dotenvdotenvx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rodas-dotenvx/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[bnomei/kirby3-dotenv

Kirby Plugin for environment variables from .env

4151.3k2](/packages/bnomei-kirby3-dotenv)[beebmx/kirby-env

Enable env variables to Kirby

2141.2k4](/packages/beebmx-kirby-env)

PHPackages © 2026

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