Skip to main content

Machine Outputs

Three machine-readable formats, one flag: --format=json, --format=llm, and --format=markdown. All are stable and deterministic. Same input, same output.

JSON

differens main..feature --format=json prints one document with everything: the per-file narrated changes and the cross-file moves.
Schema notes:
  • perFile is an array of SemanticChange objects: description, filePath, and the full action (typed EditAction, containment context chain included, nearest ancestor first).
  • crossFileMoves is a flattened summary of kind, name, source, destination, and whether the node was edited in transit.
  • Hash values are serialized as integers. The JSON replacer handles bigint as a precaution, though hashes currently fit in 53-bit safe integers.

LLM

--format=llm is a compact, self-contained document. It costs less than the raw diff it replaces. Each named change gets one line, each file is named once, and unnamed churn collapses into a tally. Every named change carries its source line, so a model can read twenty lines of context instead of the whole file.
Line grammar: Pipe it straight into a model:

Markdown

--format=markdown is a changelog you can drop into a PR description: one ## heading per file, one bullet per change.
Empty changesets render as _no logical changes_.

Streaming (future)

ndjson streaming output is on the roadmap. It will emit one change per line as trees finish matching, for long-running diffs over large changesets. Track it in the repo’s open issues.