whatsdiff
What's diff is a CLI tool to help you inspect what has changed in your dependencies after a composer update or npm update.
Visit whatsdiff.app for complete documentation and usage examples.
โจ Features
- Analyse changes in
composer.lockandpackage-lock.jsonbetween commits - Read changelog and release notes of updated packages
- Interactive Terminal UI
- Multiple output formats (text, JSON, markdown)
- MCP server to help LLM understand how to upgrade your project dependencies
- CI/CD integration to check if specific packages have changed
๐ Installation
Via Composer global require command
composer global require whatsdiff/whatsdiffor by downloading binaries on the latest release, currently only these binaries are compiled on the CI:
- macOS x86_64
- macOS arm64
- linux x86_64
- linux arm64
- windows x64
๐ Usage
For complete documentation, visit whatsdiff.app/docs
Analyse Command
Show what changed after your last composer update or npm update:
whatsdiff
# or explicitly
whatsdiff analyseBetween Command
Compare dependencies between two commits, branches, or tags:
# Compare between two tags
whatsdiff between v1.0.0 v2.0.0
# Compare between commits
whatsdiff between abc123 def456
# Compare from a commit to HEAD
whatsdiff between abc123Terminal UI Mode
Launch an interactive Terminal UI with keyboard navigation:
whatsdiff tuiCheck Command
Check if a specific package has changed (useful for CI/CD):
# Check if a package was updated
whatsdiff check livewire/livewire --is-updated
# Check if a package was added
whatsdiff check new/package --is-added
# Use in scripts with exit codes
if whatsdiff check critical/package --is-updated --quiet; then
echo "Critical package updated, running extra tests..."
fiChangelog Command
View release notes for updated packages:
whatsdiff changelog guzzlehttp/guzzle 7.7.0...7.8.1 --type=composer --summaryConfiguration
Manage cache and other settings:
# View all configuration
whatsdiff config
# Disable cache
whatsdiff config cache.enabled false
# Set cache time limits (in seconds)
whatsdiff config cache.min-time 600Output Formats
All commands support multiple output formats:
# JSON output
whatsdiff --format=json
# Markdown output
whatsdiff --format=markdown
# Disable cache for a single run
whatsdiff --no-cache๐ง Contributing
This project follows PSR coding style. You can use composer pint to apply.
All tests are executed with pest. Use composer pest
It's recommended to execute composer qa before commiting (alias for executing Pint and Pest)
Testing
This project use Pest for testing.
composer testBuild from sources
This project use box, php-static-cli and php-micro.
A build script has been created to build the project. (tested only on macOS x86_64)
composer buildThen you can build the binary that you can retrieve in build/bin/
๐ฅ Credits
whatsdiff was created by Eser DENIZ.
๐ License
whatsdiff PHP is licensed under the MIT License. See LICENSE for more information.
