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

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

omenejoseph/dynamic-env
=======================

A package to dynamically generate .env values from secret services like AWS secrets

1.0.0(3y ago)27MITPHPPHP ^8.0

Since Jul 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/omenejoseph/dynamic-env)[ Packagist](https://packagist.org/packages/omenejoseph/dynamic-env)[ Docs](https://github.com/omenejoseph/dynamic-env)[ RSS](/packages/omenejoseph-dynamic-env/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Package is meant to help development teams easily manage their env variables across environments
================================================================================================

[](#package-is-meant-to-help-development-teams-easily-manage-their-env-variables-across-environments)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8dff3a5eb09b64be460179b6c8c2079745ebdf50a3e2155825b74598cf97c3f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6d656e656a6f736570682f64796e616d69632d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/omenejoseph/dynamic-env)[![Total Downloads](https://camo.githubusercontent.com/a9624e798cc07cdf3a92f54064f412249651eb5e64709bb477cd9fd71b18714d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6d656e656a6f736570682f64796e616d69632d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/omenejoseph/dynamic-env)[![GitHub Actions](https://github.com/omenejoseph/dynamic-env/actions/workflows/main.yml/badge.svg)](https://github.com/omenejoseph/dynamic-env/actions/workflows/main.yml/badge.svg)

So imagine you are onboarding a new member of your team and you need to send them all the variables they need to be up and running in your laravel application or you add a new variable to your .env file and you want all your engineers to be able to have that new variable and its actual value you cannot push to git in .env example, this package utilises AWS secrets to help solve this problem. With as little as one command you can sync your current .env file to AWS secrets manager and ask your team to re populate their .env file with all the new variables added. Another advantage of this package is that you are able to specify which environment you want to sync to and populate from, thus properly seperating your environments making them clean and tidy.

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

[](#installation)

You can install the package via composer:

```
composer require omenejoseph/dynamic-env
```

Dont forget to publish the application config and prefill with the appopriate credentials

```
return [
    /* Secret manager */
    'secret_manager' => 'aws',

    /* AWS credentials */
    'aws_key' => env('AWS_ACCESS_KEY_ID'),
    'aws_secret' => env('AWS_SECRET_ACCESS_KEY'),
    'aws_secret_region' => env('AWS_SECRET_REGION'),

    /* Environments that you would be saving the envs to */
    'environments' => [
        'local',
        'qa',
        'production'
    ],

    /* suffix appended to .env when generating the new file eg. .env.sync */
    'env-suffix' => 'sync',
];
```

Usage
-----

[](#usage)

```
php artisan sync:env
```

This command asks for the environment you want to sync to and populates AWS secret with the variables in your current .env file

```
php artisan populate:env
```

This command asks for the environment you want to populate from and replaces your current .env file with the env variables for that environment on AWS secrets.

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

- [Omene Joseph](https://github.com/omenejoseph)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1432d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bb342021887a605f8461a864a2e1120d32b6e3b5d3c40489ad43452f86717c3?d=identicon)[omenejoseph](/maintainers/omenejoseph)

---

Top Contributors

[![omenejoseph](https://avatars.githubusercontent.com/u/31065489?v=4)](https://github.com/omenejoseph "omenejoseph (3 commits)")

---

Tags

omenejosephdynamic-env

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M186](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M277](/packages/illuminate-pipeline)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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