Output Formats#

diffyml supports eight output formats. Pick one with -o / --output.

FormatFlagUse case
detailed-o detailed (default)Human review — full context
compact-o compactQuick scan of changes
brief-o briefCounts only
github-o githubGitHub Actions annotations
gitlab-o gitlabGitLab Code Quality JSON
gitea-o giteaGitea CI annotations
json-o jsonMachine-readable, scriptable
json-patch-o json-patchRFC 6902 JSON Patch

detailed (default)#

Human-readable terminal output with colors, paths, and surrounding context. Best for interactive use.

diffyml old.yaml new.yaml

compact#

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.yaml

brief#

Just the change counts. Useful when you only care whether something changed, not what.

diffyml -o brief old.yaml new.yaml

Pair 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.yaml

To 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.json

gitea#

Emits annotations in Gitea’s GitHub-Actions-compatible format.

diffyml -o gitea old.yaml new.yaml

json#

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