php-prosvirin-dev/laravel-env-sync
最新稳定版本:v1.0.0
Composer 安装命令:
composer require php-prosvirin-dev/laravel-env-sync
包简介
Sync .env.example with .env file in Laravel
README 文档
README
A Laravel package that synchronizes your .env.example with .env file.
Features
- Auto-sync - Adds missing variables from .env.example to .env
- No overwrites - Preserves existing values
- Extra variables detection
- Backup support before force sync
- Interactive add new variables
- Interactive remove variables
- Force sync with backup
Requirements
- PHP 8.1 or higher
- Laravel 10.x or 11.x
Installation
composer require php-prosvirin-dev/laravel-env-sync --dev
Usage
Basic sync:
php artisan env:sync
Force sync with backup:
php artisan env:sync --force
Add new variable:
php artisan env:sync --add
Remove variable:
php artisan env:sync --remove
CI/CD Integration
Use this package in your CI/CD pipeline to ensure .env files are always in sync with .env.example:
name: Check Environment Consistency
on: [push, pull_request]
jobs:
check-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: composer install
- name: Check .env Consistency
run: |
php artisan env:sync
git diff --exit-code
License
MIT
统计信息
- 总下载量: 102
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-23