PHPackages                             neelkanthk/laravel-easyenv - 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. neelkanthk/laravel-easyenv

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

neelkanthk/laravel-easyenv
==========================

Easily manage and switch between multiple environment files using cli.

1.1.0(5y ago)2013MITPHPPHP &gt;=7.2

Since Oct 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/neelkanthk/laravel-easyenv)[ Packagist](https://packagist.org/packages/neelkanthk/laravel-easyenv)[ RSS](/packages/neelkanthk-laravel-easyenv/feed)WikiDiscussions master Synced yesterday

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

[![Laravel EasyEnv Logo](https://github.com/neelkanthk/repo_logos/raw/master/LaravelEasyEnv_logo.png?raw=true)](https://github.com/neelkanthk/repo_logos/blob/master/LaravelEasyEnv_logo.png?raw=true)

EasyEnv
=======

[](#easyenv)

A Laravel package to easily manage and switch between multiple environment files using artisan cli.

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

[](#installation)

```
composer require neelkanthk/laravel-easyenv
```

Publish the config file.
------------------------

[](#publish-the-config-file)

```
php artisan vendor:publish --provider="Neelkanth\Laravel\EasyEnv\Providers\EasyEnvServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Add the following lines just before the `php return $app; ` in the ` bootstrap/app.php`

```
use Neelkanth\Laravel\EasyEnv\EasyEnv;
$app->useEnvironmentPath(EasyEnv::path())->loadEnvironmentFrom(EasyEnv::file());
```

Managing the Envrionments through CLI
-------------------------------------

[](#managing-the-envrionments-through-cli)

The package provides following `artisan` commands to add/remove and enable/disable environments.

The commands have following signature.

```
php artisan easyenv:[action] {env} {path} {file}
```

```
[action] : Following action are available list|add|remove|enable|disable
```

```
{env}: The name of your choice for the environment.
{path}: The absolute path of the location of the environment file
{file}: The name of the environment file residing on the filesystem.
```

#### 1. Add a new environment.

[](#1-add-a-new-environment)

```
php artisan easyenv:add staging /var/www/env/ .staging
```

#### 2. Enable an environment.

[](#2-enable-an-environment)

*Only 1 environment can be enabled at a time.*

```
php artisan easyenv:enable staging
```

#### 3. Listing all available environments.

[](#3-listing-all-available-environments)

```
php artisan easyenv:list
```

EnvironmentStatusPathFilestagingEnabled/var/www/env/.staging#### 4. Disable currently enabled environment.

[](#4-disable-currently-enabled-environment)

```
php artisan easyenv:disable
```

#### 5. Remove an environment

[](#5-remove-an-environment)

```
php artisan easyenv:remove staging
```

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Neelkanth Kaushik](https://github.com/username)
- [All Contributors](../../contributors)

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

4

Last Release

2046d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d024795d1517d97c691382c2ff955cb3157ccab11222cbcb3b91d00bc2fe8c1?d=identicon)[Neelkanth Kaushik](/maintainers/Neelkanth%20Kaushik)

---

Top Contributors

[![neelkanthk](https://avatars.githubusercontent.com/u/16952465?v=4)](https://github.com/neelkanthk "neelkanthk (13 commits)")

---

Tags

envenvironment-configurationhacktoberfesthacktoberfest2021laravellaravelenvenvironment configuration

### Embed Badge

![Health badge](/badges/neelkanthk-laravel-easyenv/health.svg)

```
[![Health](https://phpackages.com/badges/neelkanthk-laravel-easyenv/health.svg)](https://phpackages.com/packages/neelkanthk-laravel-easyenv)
```

###  Alternatives

[sven/flex-env

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

10297.2k](/packages/sven-flex-env)[tamer-dev/laravel-env-cli

laravel commands to work with .env file in cli

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

PHPackages © 2026

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