cwhite92 / dotenvdiff
Easily see differences between two .env files
Installs: 158
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/cwhite92/dotenvdiff
Requires
- php: >7.3
- jc21/clitable: ^1.2
- vlucas/phpdotenv: ^5.2
Requires (Dev)
- phpunit/phpunit: ^8
README
dotenvdiff (ded) allows you to quickly compare the environment variable differences between two .env (or .env.example) files.
Installation
Requirements:
- PHP 7.3 or greater
Require the tool globally via Composer:
composer global require cwhite92/dotenvdiff
If you don't have Composer's bin directory in your $PATH, now is the time to add it to ~/.bash_profile or ~/.bashrc:
export PATH=~/.composer/vendor/bin:$PATH
Usage
Simply run the ded command and give it the locations of the two .env files that you wish to compare:
ded /path/to/first/.env /path/to/second/.env
If you're running this in a Laravel project, you probably want to run it like this in your project's root directory:
ded .env.example .env
It will give an output similar to the below:
╔═════════════════════╤══════╗
║ .env.example │ .env ║
╟─────────────────────┼──────╢
║ GITHUB_API_ENDPOINT │ ║
╚═════════════════════╧══════╝
In this instance, there is a new GITHUB_API_ENDPOINT environment variable that exists in .env.example but not in .env. Somebody on our team added it and forgot to tell us 🙂
License
cwhite92/dotenvdiff is licensed under the MIT License (MIT). Please see the license file for more information.
