PHPackages                             feliximafidon/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. feliximafidon/flex-env

ActiveLibrary

feliximafidon/flex-env
======================

Edit your .env file in Laravel directly from the command line. Fork of sven/flexenv

v1.0.1(7y ago)031MITPHPPHP ^5.5.9 || ^7.0CI failing

Since Mar 3Pushed 5y agoCompare

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

READMEChangelogDependencies (4)Versions (3)Used By (0)

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

[](#laravel-flexenv)

[![Latest Version on Packagist](https://camo.githubusercontent.com/320a1d1cec862687a3dddb3c350e60b248a79b9f5d6e657aa4c5632ebd4e9078/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66656c6978696d616669646f6e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/feliximafidon/flex-env)[![Total Downloads](https://camo.githubusercontent.com/4a9705e00813e183cb628f4b2d8681800a5421ab67858b9efc1178aae6d201c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66656c6978696d616669646f6e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/feliximafidon/flex-env)[![Software License](https://camo.githubusercontent.com/6c711032aff1ca0eb6b211aa6cb3649ce7fd64a7714e1181d4bb457f9680e7cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ae5f8a64ddc8c50023b6430af61f5ac52564a94cf38b66cca32aae06ab6ac7c0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f66656c6978696d616669646f6e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/feliximafidonluijten/flex-env)[![Code Climate](https://camo.githubusercontent.com/c79c2a88c0679501af5dbfc32d94fff80ccda46c181dc688c9fafe5a34cc17d1/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f66656c6978696d616669646f6e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/feliximafidonluijten/flex-env)[![Code Quality](https://camo.githubusercontent.com/bb316dc7029a1bd34aba76c4225609869058ffdf1eb4a64e47a5a8e56010ecb1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f66656c6978696d616669646f6e6c75696a74656e2f666c65782d656e762e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/feliximafidonluijten/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 feliximafidon/flex-env --dev
```

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

```
{
    "require-dev": {
        "feliximafidon/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' => [
    ...
    IF\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). Original code was taken from [sven/flex-env](https://github.com/svenluijten/flex-env)

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)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

Total

2

Last Release

2626d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7954fc6e82632ecbeb12d5c4c30ec7d575dcdc96958febb09d1806b7d4e0e45?d=identicon)[feliximafidon](/maintainers/feliximafidon)

---

Top Contributors

[![feliximafidon](https://avatars.githubusercontent.com/u/36160264?v=4)](https://github.com/feliximafidon "feliximafidon (1 commits)")

---

Tags

laravelartisanenvFlexible

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sven/flex-env

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

10297.2k](/packages/sven-flex-env)[msztorc/laravel-env

Laravel env helper commands

7855.4k](/packages/msztorc-laravel-env)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[encodia/laravel-health-env-vars

Custom check for Spatie's Laravel Health - Ensure every .env variable you need has been set

20143.5k](/packages/encodia-laravel-health-env-vars)[tamer-dev/laravel-env-cli

laravel commands to work with .env file in cli

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

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

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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