Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muzammal01/syncenvvariables
SyncEnvVariables is a Laravel package that automates syncing environment variables from .env.example to .env. Ideal for team projects, it ensures consistent environment settings with a single Artisan command, appending any missing variables to .env
https://github.com/muzammal01/syncenvvariables
automation env-sync environment-variables laravel package php
Last synced: 3 days ago
JSON representation
SyncEnvVariables is a Laravel package that automates syncing environment variables from .env.example to .env. Ideal for team projects, it ensures consistent environment settings with a single Artisan command, appending any missing variables to .env
- Host: GitHub
- URL: https://github.com/muzammal01/syncenvvariables
- Owner: Muzammal01
- Created: 2024-11-08T11:41:07.000Z (5 days ago)
- Default Branch: main
- Last Pushed: 2024-11-08T12:28:17.000Z (5 days ago)
- Last Synced: 2024-11-08T12:33:23.729Z (5 days ago)
- Topics: automation, env-sync, environment-variables, laravel, package, php
- Language: PHP
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SyncEnvVariables
[![Latest Version on Packagist](https://img.shields.io/packagist/v/muzammal/syncenvvariables.svg?style=flat-square)](https://packagist.org/packages/muzammal/syncenvvariables)
[![Total Downloads](https://img.shields.io/packagist/dt/muzammal/syncenvvariables.svg?style=flat-square)](https://packagist.org/packages/muzammal/syncenvvariables)**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 `.env` file 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
1. **Install the package via Composer:**
```bash
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:
```bash
php artisan sync:env
```This command will:
- Check your `.env.example` file and compare it to your `.env` file.
- Add any missing variables from `.env.example` to `.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:
```bash
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.