PHPackages                             jedymatt/laravel-sail-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. jedymatt/laravel-sail-env

ActiveLibrary

jedymatt/laravel-sail-env
=========================

Configures .env file to match the sail environment variable's requirements.

v1.1.6(3y ago)6998MITPHPPHP ^7.3|^8.0

Since Jul 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jedymatt/laravel-sail-env)[ Packagist](https://packagist.org/packages/jedymatt/laravel-sail-env)[ RSS](/packages/jedymatt-laravel-sail-env/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (2)Versions (10)Used By (0)

laravel-sail-env
================

[](#laravel-sail-env)

[![Packagist Downloads](https://camo.githubusercontent.com/b6fb5dc717fca422cb3320bddf6f678646ed2b45633df68ea42b872efb42a1b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/b6fb5dc717fca422cb3320bddf6f678646ed2b45633df68ea42b872efb42a1b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)[![Packagist Version](https://camo.githubusercontent.com/5040a4d4e6353fccbe8c660ef95698f8f95589b9e518cb66eda1798781303eda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5040a4d4e6353fccbe8c660ef95698f8f95589b9e518cb66eda1798781303eda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)[![Packagist PHP Version Support](https://camo.githubusercontent.com/c317f1b766ab09c5060b04346a6621cbc884085be60d891fda79bf8847ed0734/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/c317f1b766ab09c5060b04346a6621cbc884085be60d891fda79bf8847ed0734/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6564796d6174742f6c61726176656c2d7361696c2d656e763f7374796c653d666c61742d737175617265)

Configures .env file to match the sail environment variable's requirements.

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

[](#installation)

Install as development dependency:

```
composer require --dev jedymatt/laravel-sail-env
```

Usage
-----

[](#usage)

To configure .env file:

```
php artisan sail:env
```

Why is this created?
--------------------

[](#why-is-this-created)

To configure the .env file without having to run `php artisan sail:install` again just to replace the variables in .env file. It would be tedious specially when you have custom configuration in your *docker-compose.yml* because `sail:install` command overwrites your *docker-compose.yml* file.

How?
----

[](#how)

**\[v1.1.5 or newer\]** It reads the services of sail inside docker-compose.yml file using yaml parser. Then, It uses the sail's *InteractsWithDockerComposeServices* trait to replace env variables so that it keeps in sync to *laravel/sail* package.

**\[v1.1.4 or older\]** It reads the services of sail inside docker-compose.yml file using regex. Then, It uses the sail's *InstallCommand's replaceEnvVariables* method so that it keeps in sync to *laravel/sail* package.

Notes
-----

[](#notes)

v1.1.5 or newer is only compatible to laravel/sail v1.20.0 and up.

Found Bugs?
-----------

[](#found-bugs)

Report to [GitHub Issues](https://github.com/jedymatt/laravel-env-sail/issues)

Have suggestions?
-----------------

[](#have-suggestions)

Feel free to create discussion in [GitHub Discussions](https://github.com/jedymatt/laravel-sail-env/discussions)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Recently: every ~59 days

Total

9

Last Release

1158d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.0.1PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0dad64e0ab4afa884ae67ab1ab08aa8ec23a645f9a1880c9b0a6e743371115a5?d=identicon)[jedymatt](/maintainers/jedymatt)

---

Top Contributors

[![jedymatt](https://avatars.githubusercontent.com/u/54795428?v=4)](https://github.com/jedymatt "jedymatt (59 commits)")

---

Tags

envlarave-sail-envlaravellaravel-packagelaravel-sailphpsaillaravelenvsaillaravel-sail

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jedymatt-laravel-sail-env/health.svg)

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

###  Alternatives

[msztorc/laravel-env

Laravel env helper commands

7855.4k](/packages/msztorc-laravel-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)
