diffyml compares YAML documents according to their structure rather than their physical line layout. It is aimed at configuration data, Kubernetes manifests and CI workflows where changes to ordering or formatting can make an ordinary textual diff unnecessarily noisy.
It can compare individual files, remote documents and directory trees, and includes specialised handling for Kubernetes resources. The command is also suitable for automated environments through machine-readable output, exit codes and CI-specific annotations.
This is free and open source software.
Key Features
- Compares YAML semantically rather than treating it as unstructured text.
- Matches Kubernetes resources using API version, kind and resource name or generated name.
- Detects renamed Kubernetes resources using content similarity.
- Can ignore API-version changes when comparing resources that have migrated between Kubernetes APIs.
- Compares complete directory trees as well as individual files.
- Supports local files and YAML obtained directly from HTTP or HTTPS URLs.
- Provides detailed, compact and brief human-readable views together with JSON output.
- Produces native annotation formats for GitHub, GitLab and Gitea CI systems.
- Integrates with Git through GIT_EXTERNAL_DIFF and can be scoped to YAML files through attributes.
- Provides exact and regular-expression path filtering.
- Offers inverse comparisons for focusing on unchanged or complementary parts of a comparison.
- Highlights the changed portion inside scalar values such as image tags, addresses and ports.
- Can mask Kubernetes Secrets and arbitrary sensitive paths across its output formats.
- Inspects embedded X.509 certificates when comparing relevant values.
- Supports project-level configuration files and custom terminal colours.
- Can optionally generate natural-language summaries through the Anthropic API.
Website: github.com/szhekpisov/diffyml
Support:
Developer: Sergei Zhekpisov
License: MIT License

diffyml is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Terminal-Based Diff Tools | |
|---|---|
| difftastic | Structural diff tool that compares files based on their syntax |
| hunk | Terminal diff viewer with syntax highlighting and side-by-side views |
| diff-so-fancy | Attractive diffs with diff-highlight and more |
| delta | Viewer for git and diff output |
| icdiff | An improved colored diff |
| diffoscope | In-depth comparison of files, archives, and directories |
| colordiff | Wrapper for diff with pretty syntax highlighting |
| diffsitter | Semantic diff tool |
| objdiff | Local diffing tool for decompilation project |
| ydiff | Tool to view colored, incremental diff in a version controlled workspace |
| diffr | Word-by-word diff highlighting utility |
| dyff | diff tool for YAML files |
| Wdiff | Wordwise implementation of diff |
| dwdiff | diff program that operates at the word level |
| diffyml | Compares YAML documents by their structure |
| oyo | Step-through diff viewer |
| diff2html-cli | Generate HTML diffs |
| biodiff | Terminal-based binary diff viewer |
| dirdiff | Compute the differences between two directories |
| csvdiff | Fast diff tool for comparing CSV files |
| VBinDiff | Visual binary diff |
| riff | Wrapper around diff |
| csv-diff | Diffing CSV and JSON files |
| xmldiff | Compare XML documents |
| Patdiff | File diff using the Patience Diff algorithm |
| dead-ringer | Binary diff utility |
| sesdiff | Generates a shortest edit script |
| semdiff | Semantic diff tool written in Rust |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.