This project is a console utility that finds the difference between two files.
This utility can work with such data formats as: JSON
, YAML
, YML
.
You can also see the comparison result in different output formats, for example: stylish
, plain
, json
.
The default output format is stylish
.
If the files do not exist, the utility will notify you about it.
- Linux, MacOS, WSL
- PHP >=8.3
- Composer
- Make
- Git
- php-cli-tools
- docopt
- functional-php
- yaml
Downloading the utility and installing dependencies:
git clone https://github.com/NikolaiProgramist/Differ.git
cd php-project-48
make install
Give the binary file execution rights:
sudo chmod +x bin/gendiff
To use the utility, run the binary file and specify the output format (stylish
by default).
Also pass the paths to the two files you need:
bin/gendiff --format=stylish file1.json file2.json
You can also choose the second output format plain
:
bin/gendiff --format=plain file1.json file2.json
Instead of the flag --format
, you can use the short version -f
.