laravel env guard

Laravel ENV Guardian

Manage, validate and keep your environment variables synchronized. Never lose track of your .env files again.

100% Free & Open Source
Laravel 10, 11 & 12

Sound Familiar?

Common headaches when managing environment variables

Out of Sync

.env and .env.example files constantly drift apart, causing confusion in the team.

Dead Keys

Old, unused environment variables cluttering your files with no way to identify them.

Unsafe Sharing

Sharing credentials via Slack or email, leaving security traces everywhere.

Powerful Features

Everything you need to manage environment variables like a pro

Auto-Sync Files

Automatically detect and sync differences between .env and .env.example files.

php artisan env:check --fix

Detect Unused Keys

Find environment variables that are no longer used in your codebase.

php artisan env:check --unused

Safe Cleanup

Remove unused keys with automatic backups. Never lose data.

php artisan env:check --remove-unused

Secure Sharing

Share credentials securely with self-destructing links.

php artisan env:share DB_PASSWORD

Multi-Environment

Compare staging, production, and any custom environment files.

php artisan env:check --env=staging

Smart Suggestions

Get intelligent recommendations for detected keys and patterns.

Identifies Laravel, Vite, Mix vars

How It Works

Three simple steps to better environment management

1

Install the Package

Add Laravel ENV Guardian to your project with a single command.

composer require oscarcoleto/laravel-env-guardian --dev
2

Run Your First Check

Instantly see what's out of sync or unused in your environment files.

php artisan env:check --unused
3

Stay in Control

Keep your environment files clean, synced, and secure automatically.

Clean .env files • Secure sharing • Smart insights

Quick Installation

1. Install via Composer

composer require oscarcoleto/laravel-env-guardian --dev

2. Publish Config (Optional)

php artisan vendor:publish --tag=env-guardian-config

3. Start Using

php artisan env:check

That's it! You're ready to go.

Usage Examples

Real-world scenarios and commands

Check Synchronization

Verify that .env and .env.example are in sync

$ php artisan env:check
Comparando .env con .env.example...
Validación correcta

Auto-Fix Missing Keys

Automatically add missing keys to .env.example

$ php artisan env:check --fix
Claves faltantes: NEW_API_KEY
Claves agregadas

Find Unused Variables

Detect environment variables not used in your code

$ php artisan env:check --unused
Claves no usadas: OLD_API_KEY
Puede estar en desuso

Share Credentials Securely

Create self-destructing links for secrets

$ php artisan env:share DB_PASSWORD
https://share.app/abc123
Expira en 1 hora

100% Free & Open Source

Support the project if it saves you time

$5

Coffee

  • Your name in SUPPORTERS.md
  • Good karma
Buy Coffee

$25

Pizza

  • Name + link in README
  • Supporter badge
GitHub Sponsor

Collaborate

Enterprise

  • Let's work together
  • Custom solutions
LinkedIn

Every contribution helps maintain and improve this project