This project is a library/utility that finds the difference between two files.
The library can work with data formats such as: JSON
, YAML
, YML
.
You can also see the result of the comparison in the terminal in different output formats,
for example: stylish
, plain
, json
. The default format is stylish
.
If the files do not exist, the library will inform you.
- 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
.