Need help with dyff?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

246 Stars 12 Forks MIT License 320 Commits 14 Opened issues


/ˈdʏf/ - diff tool for YAML files, and sometimes JSON

Services available


Need anything else?

Contributors list

δyƒƒ /ˈdʏf/

License Go Report Card Build Status Codecov GoDoc Release


A diff tool for YAML files, and sometimes JSON


is inspired by the way the old BOSH v1 deployment output reported changes from one version to another by only showing the parts of a YAML file that change.

Each difference is referenced by its location in the YAML document by using either the Spruce or go-patch path syntax. The output report aims to be as compact as possible to give a clear and simple overview of the change.

Similar to the standard

tool, it follows the principle of describing the change by going from the
input file to the target
input file.

Input files can be local files (filesystem path), remote files (URI), or the standard input stream (using


All orders of keys in hashes are preserved during processing and output to the terminal, most notably in the sub-commands to convert YAML to JSON and vice versa.


On macOS,

is available via Homebrew:
brew install homeport/tap/dyff

Prebuilt binaries for a lot of operating systems and architectures can be downloaded from the releases section.

There is a convenience script to download the latest release for Linux or macOS if you want to keep it simple (you need

installed on your machine):
curl --silent --location | bash

And of course, you can download and build

from source using
go get
GO111MODULE=on go get

Use cases and examples

  • Show the differences between two versions of


    dyff between \ \

    dyff between example

  • Embed

    into Git for better understandable differences
    # Setup...
    git config --local diff.dyff.command 'dyff_between() { dyff --color on between --omit-header "$2" "$5"; }; dyff_between'
    echo '*.yml diff=dyff' >> .gitattributes

    And have fun, e.g.:

    git log --ext-diff -u git show --ext-diff HEAD

    dyff between example of a Git commit

  • Convert a JSON stream to YAML

    sometool --json | jq --raw-output '.data' | dyff yaml -
  • Sometimes you end up with YAML or JSON files, where the order of the keys in maps was sorted alphabetically. With

    you can restructure keys in maps to a more human appealing order:
    sometool --export --json | dyff yaml --restructure -

    Or, rewrite a file in place with the restructured order of keys.

    dyff yaml --restructure --in-place somefile.yml
  • Just print a YAML (or JSON) file to the terminal to look at it. By default,

    will use a neat output schema which includes different colors and indent helper lines to improve readability. The colors are roughly based on the default Atom schema and work best on dark terminal backgrounds. The neat output is disabled if the output of
    is redirected into a pipe, or you can disable it explicitly using the
    dyff yaml somefile.yml
  • Convert a YAML file to JSON and vice versa:

    dyff json


    sub-command (
    , or
    ) defines the output format, the tool automatically detects the input format itself.
    dyff yaml

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.