PHPackages                             snowsoft/flex-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. [CLI &amp; Console](/categories/cli)
4. /
5. snowsoft/flex-env

ActiveLibrary[CLI &amp; Console](/categories/cli)

snowsoft/flex-env
=================

Edit your .env file in Laravel directly from the command line.

0.05(3mo ago)0210MITPHP

Since Feb 28Pushed 3mo agoCompare

[ Source](https://github.com/snowsoft/flex-env)[ Packagist](https://packagist.org/packages/snowsoft/flex-env)[ RSS](/packages/snowsoft-flex-env/feed)WikiDiscussions 2.x Synced 3w ago

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

[![flex-env](https://cloud.githubusercontent.com/assets/11269635/12526309/85a09084-c16c-11e5-8099-cddf6f8fce78.jpg)](https://cloud.githubusercontent.com/assets/11269635/12526309/85a09084-c16c-11e5-8099-cddf6f8fce78.jpg)

Laravel FlexEnv
===============

[](#laravel-flexenv)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5c093cd5a881d199bd05913fcbfffcd4002cba6c4de22cf98903a672601aa991/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7376656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sven/flex-env)[![Total Downloads](https://camo.githubusercontent.com/0816066d48dfda05a782c87e88d2e8630cff5d9bd064f087afee15c53b1c4072/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7376656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sven/flex-env)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/f0ea10dfd4fd59f36802d4bbcd0655f4ec56bf4ab9e8cd96750ca2f5db3a7830/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7376656e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/svenluijten/flex-env)[![Code Climate](https://camo.githubusercontent.com/fc46e786b26d5de928430af5d54c772fdce3cc41045fd8f0dddabde6844319e1/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f7376656e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/svenluijten/flex-env)[![Code Quality](https://camo.githubusercontent.com/c09af4e9504b7e23fab9fe3d088d2232528e757e44d642236d9bc80bbdbafcb6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7376656e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/svenluijten/flex-env/?branch=master)[![StyleCI](https://camo.githubusercontent.com/26c8dc8cf4946f5e28949c891ac594f340c39bd3461976dd1216df990bf41aea/68747470733a2f2f7374796c6563692e696f2f7265706f732f34393634343738312f736869656c64)](https://styleci.io/repos/49644781)

This package adds a handful of useful commands to edit your `.env` file in Laravel directly from the command line with a simple, human readable API. Never touch the mouse again!

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

[](#installation)

Via [composer](http://getcomposer.org):

```
$ composer require snowsoft/flex-env --dev
```

Alternatively, add the package to your dev dependencies in `composer.json` and run `composer update` afterwards:

```
{
    "require-dev": {
        "snowsoft/flex-env": "^2.0"
    }
}
```

**Note:** If you're using Laravel 5.5, you're done! The service provider is automatically registered in the container, thanks to [auto-discovery](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518).

Next, add the `FlexEnvServiceProvider` to your `providers` array in `config/app.php`:

```
// config/app.php
'providers' => [
    ...
    Sven\FlexEnv\FlexEnvServiceProvider::class,
]
```

Usage
-----

[](#usage)

The commands in this package should now be registered. Simply run `php artisan`, and you will see them in the list.

```
# Create or edit an entry in your .env file:
$ php artisan env:set {key} {value} [--line-break|-L]
# Add the --line-break (or -L) option to insert a line break before the entry.
```

```
# Delete an entry from your .env file:
$ php artisan env:delete {key}
```

```
# Show the value of the given key from your .env file:
$ php artisan env:get {key}
```

```
# Show the entire .env file:
$ php artisan env:list
```

All changes you made should now be reflected in your `.env` file.

Inspiration
-----------

[](#inspiration)

Inspiration for this package came from [LeShadow's ArtisanExtended](https://github.com/LeShadow/ArtisanExtended).

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

[](#contributing)

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the [CONTRIBUTING.md](CONTRIBUTING.md) first, though. See the [contributors page](../../graphs/contributors) for all contributors.

License
-------

[](#license)

`sven/flex-env` is licensed under the MIT License (MIT). See the [license file](LICENSE.md)for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.8% 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 ~223 days

Recently: every ~183 days

Total

6

Last Release

97d ago

Major Versions

0.05 → 2.x-dev2026-03-18

PHP version history (3 changes)0.01PHP ^7.2 || ^8.0|| ^8.1|| ^8.2

0.03PHP ^7.2 || ^8.0|| ^8.1|| ^8.2|| ^8.3

0.04PHP ^7.2 || ^8.0|| ^8.1|| ^8.2|| ^8.3 || ^8.4

### Community

Maintainers

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

---

Top Contributors

[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (83 commits)")[![snowsoft](https://avatars.githubusercontent.com/u/4568234?v=4)](https://github.com/snowsoft "snowsoft (7 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (5 commits)")[![jamosaur](https://avatars.githubusercontent.com/u/4105611?v=4)](https://github.com/jamosaur "jamosaur (3 commits)")[![Pezhvak](https://avatars.githubusercontent.com/u/3134479?v=4)](https://github.com/Pezhvak "Pezhvak (1 commits)")

---

Tags

laravelartisanenvFlexible

### Embed Badge

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

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

###  Alternatives

[sven/flex-env

Edit your .env file in Laravel directly from the command line.

10397.2k](/packages/sven-flex-env)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815424.6k52](/packages/nunomaduro-laravel-console-menu)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[ronasit/laravel-entity-generator

Provided console command for generating entities.

2152.5k](/packages/ronasit-laravel-entity-generator)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)[tamer-dev/laravel-env-cli

laravel commands to work with .env file in cli

127.4k](/packages/tamer-dev-laravel-env-cli)

PHPackages © 2026

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