yamlcomparediff

Diff viewer for YAML files


I want to compare YAML semantically rather than line by line.

Would be great to integrate it in IntelliJ and get a visual representation.

I found several online tools like https://www.yamldiff.com/ which work great, but I need an offline tool.

Does anyone know a diff viewer which is aware of YAML structure?


Solution

  • difftastic, from the homepage it seems to be a perfect fit:

    Difftastic is a CLI diff tool that compares files based on their syntax, not line-by-line. Difftastic produces accurate diffs that are easier for humans to read.

    It is based on tree-sitter and supports YAML via tree-sitter-yaml.