PHPackages                             bushart/set-env-variables - 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. bushart/set-env-variables

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

bushart/set-env-variables
=========================

laravel set env variable

1.2(2y ago)18MITPHP

Since Nov 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/busharthussain/set-env-variables)[ Packagist](https://packagist.org/packages/bushart/set-env-variables)[ RSS](/packages/bushart-set-env-variables/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

set:env variable Command
========================

[](#setenv-variable-command)

Set a .env file variable from the command line.

### Docs

[](#docs)

- [Installation](#installation)
- [Usage](#usage)

### Install package

[](#install-package)

Add the package in your composer.json by executing the command.

```
composer require bushart/set-env-variables
```

### Usage

[](#usage)

When running the env:set Artisan command, provide both a key and value as two arguments.

```
$ php artisan env:set app_name Example
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to 'Example'

```

You can set values with spaces by wrapping them in quotes.

```
$ php artisan env:set app_name "Example App"
# Environment variable with key 'APP_NAME' has been changed from 'Laravel' to '"Example App"'

```

The command will also create new environment variables if an existing one does not exist.

```
$ php artisan env:set bash=code
# Environment variable with key 'BASH' has been set to 'code'

```

The command will handle invalid inputs and provide meaningful error messages.

```
$ php artisan env:set @ss_n@w Laravel
# Invalid environment key. Only use letters and underscores

```

### Additional Notes

[](#additional-notes)

The env:set command is designed to enhance your environment variable management. Have fun CRUDding! :-)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

3

Last Release

901d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c8f197be03f87ca7ebfb567da963b7310d8cf259148758fac79345b24a567f1?d=identicon)[busharthussain](/maintainers/busharthussain)

---

Top Contributors

[![busharthussain](https://avatars.githubusercontent.com/u/12028370?v=4)](https://github.com/busharthussain "busharthussain (6 commits)")

### Embed Badge

![Health badge](/badges/bushart-set-env-variables/health.svg)

```
[![Health](https://phpackages.com/badges/bushart-set-env-variables/health.svg)](https://phpackages.com/packages/bushart-set-env-variables)
```

###  Alternatives

[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)[roave/psalm-html-output

Psalm HTML Output

23312.0k1](/packages/roave-psalm-html-output)[pear/system_daemon

A port of the PEAR class to create Daemons with pure PHP

11139.9k1](/packages/pear-system-daemon)[mateffy/laravel-codebase-mcp

An MCP server to give Cursor, Aider, etc. the ability to introspect your Laravel codebase directly, by querying for your models, views, routes and classes without raw file search.

201.1k](/packages/mateffy-laravel-codebase-mcp)

PHPackages © 2026

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