Output Formats#
diffyml supports eight output formats. Pick one with -o / --output.
| Format | Flag | Use case |
|---|---|---|
| detailed | -o detailed (default) | Human review — full context |
| compact | -o compact | Quick scan of changes |
| brief | -o brief | Counts only |
| github | -o github | GitHub Actions annotations |
| gitlab | -o gitlab | GitLab Code Quality JSON |
| gitea | -o gitea | Gitea CI annotations |
| json | -o json | Machine-readable, scriptable |
| json-patch | -o json-patch | RFC 6902 JSON Patch |
detailed (default)#
Human-readable terminal output with colors, paths, and surrounding context. Best for interactive use.
diffyml old.yaml new.yamlcompact#
One-line-per-change format. Good when you want a quick scan and don’t need surrounding YAML context.
diffyml -o compact old.yaml new.yamlbrief#
Just the change counts. Useful when you only care whether something changed, not what.
diffyml -o brief old.yaml new.yamlPair with --summary to swap the bare counts for an AI-generated description (see AI Summaries).
github#
Emits GitHub Actions workflow commands so changes show up as inline annotations on the PR diff.
diffyml -o github old.yaml new.yamlTo avoid spamming the UI, output is capped at 10 annotations per type. Combine with -s to fail the workflow when drift is detected.
gitlab#
Emits a GitLab Code Quality JSON report. Surface the report as a Code Quality artifact and GitLab will render diffs in the merge request UI.
diffyml -o gitlab old.yaml new.yaml > gl-code-quality.jsongitea#
Emits annotations in Gitea’s GitHub-Actions-compatible format.
diffyml -o gitea old.yaml new.yamljson#
Machine-readable JSON: a top-level array of {path, type, from, to, document_index} objects (with file added in directory mode). type is one of added, removed, modified, order_changed. Pipe into jq for scripted processing.
diffyml -o json old.yaml new.yaml | jq '.[] | select(.type == "modified")'json-patch#
RFC 6902 JSON Patch — a sequence of add/remove/replace operations that, when applied to from, produce to. Useful for replaying changes programmatically.
diffyml -o json-patch old.yaml new.yaml