Gendiff is a simple utility that compares two configuration files (JSON or YAML) and shows a difference. There are three formatting options to choose from (see demo):
- stylish (default)
- plain
- json
# plain output
gendiff --format plain path/to/file.yml another/path/file.json
Property 'common.follow' was added with value: false
Property 'group1.baz' was updated. From 'bas' to 'bars'
Property 'group2' was removed
# stylish output
gendiff filepath1.json filepath2.json
{
+ follow: false
setting1: Value 1
- setting2: 200
- setting3: true
+ setting3: {
key: value
}
+ setting4: blah blah
+ setting5: {
key5: value5
}
}
Node v16+
make install
For help use gendiff -h
. Demo:
gendiff [options] <filepath1> <filepath2>
There are three formatting options for output -f [type]
or --format [type]
:
stylish
(default)
plain
json