PHPackages                             vizrex/laravel-env-switcher - 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. vizrex/laravel-env-switcher

ActiveLaravel-package[CLI &amp; Console](/categories/cli)

vizrex/laravel-env-switcher
===========================

This package provides a command line utility to switch Laravel env files easily.

1.0.0(7y ago)13642proprietaryPHP

Since Jan 16Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Vizrex/laravel-env-switcher)[ Packagist](https://packagist.org/packages/vizrex/laravel-env-switcher)[ RSS](/packages/vizrex-laravel-env-switcher/feed)WikiDiscussions master Synced today

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

> # READ THIS FIRST
>
> [](#read-this-first)
>
> It is highly recommended for all contributors to update this file whenever there's a major update in source code. Use [this tool](https://stackedit.io/app#) for easy editing or [visit this page](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for comprehensive guide on markdown syntax.

Introduction
============

[](#introduction)

This package provides a command line utility to switch Laravel env files easily.

Signature
---------

[](#signature)

`env:switch {new_env} {--force}`

Supported Environments
----------------------

[](#supported-environments)

Following values are acceptable for `new_env` parameter:

- dev
- prod
- testing

Usage Examples
--------------

[](#usage-examples)

- `php artisan env:switch dev`
- `php artisan env:switch prod --force`

How it works?
=============

[](#how-it-works)

This utility supports 3 environments as mentioned above. It creates separate `.env` file for each environment e.g.:

- .env.dev
- .env.prod
- .env.testing

When an environment is activated, its content are copied to main `.env` file and the correspoding file gets a suffix `.active`. For example if `dev` environment is active, then `.env.dev` will be renamed to `.env.dev.active` and its content will be copied to main `.env` file.

In case the required version of `.env` file doesn't exist, its created automatically by copying `.env.example` file.

To-dos
======

[](#to-dos)

Following are the approved items:

- Item-1

Wishlist
========

[](#wishlist)

Add the suggestions in this wishlist. Only approved wishlist items can be moved to To-dos list:

- Item-1

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

2673d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49ed679f8af1a3a1da9a187d1ce6520287263a4d1c575617708fc76cbcff3ba4?d=identicon)[vizrex](/maintainers/vizrex)

---

Top Contributors

[![zeshanfarooqi](https://avatars.githubusercontent.com/u/1576772?v=4)](https://github.com/zeshanfarooqi "zeshanfarooqi (5 commits)")

### Embed Badge

![Health badge](/badges/vizrex-laravel-env-switcher/health.svg)

```
[![Health](https://phpackages.com/badges/vizrex-laravel-env-switcher/health.svg)](https://phpackages.com/packages/vizrex-laravel-env-switcher)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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