muzammal / syncenvvariables
A Laravel package to synchronize environment variables from .env.example to .env
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/muzammal/syncenvvariables
README
SyncEnvVariables is a Laravel package designed to help teams keep their .env files synchronized with the .env.example file. π By running a simple command, you can automatically update your local .env file to include any new environment variables defined in .env.example, saving time and reducing configuration errors.
β¨ Features
- π Auto-sync missing environment variables: Ensures your
.envfile includes all variables listed in.env.example. - π Improved team collaboration: Keeps all developers up-to-date with the latest environment variables.
- π οΈ Seamless integration: Simple to install and use within any Laravel project.
π Installation
-
Install the package via Composer:
composer require muzammal/syncenvvariables
π Usage
This package provides a sync:env Artisan command, which checks your .env.example file for any new or missing environment variables and appends them to your .env file if they arenβt already present.
Sync Environment Variables
Run the following command to sync the environment variables:
php artisan sync:env
This command will:
- Check your
.env.examplefile and compare it to your.envfile. - Add any missing variables from
.env.exampleto.env, keeping your local environment configuration consistent.
π Example
Suppose your .env.example file includes new variables such as API_KEY and APP_ENV. When you run:
php artisan sync:env
The command will check for any missing variables in your .env file and automatically add them. This ensures all developers have the same set of environment configurations across different environments.
π License
This package is open-source software licensed under the MIT license.