verbatra diff
Show the keys that would be added, re-translated, or orphaned per locale without writing files.
List, per target locale, the exact pending keys: the ones a run would add (missing from the target), the ones it would re-translate (source changed since last translation), and the ones now orphaned (in the target but gone from the source). diff runs the same read and diff that verbatra translate performs right before it would call a provider, then stops: no provider call, no files written, no lock file update, and no API key needed.
Synopsis
verbatra diff [flags]Flags
| Flag | Argument | Default | Effect |
|---|---|---|---|
--cwd | <path> | current directory | resolve config and locale files from this directory |
--config | <path> | search for one | load this config file instead of searching for one |
--locales | <list> | all configured targets | comma-separated subset of target locales to diff |
--json | none | off | print the diff summary as one JSON object on stdout; errors still go to stderr |
A locale has pending changes when it has at least one key to add or re-translate. Orphaned keys are reported but never count as pending, because a default run does not remove them (only verbatra translate --prune does). An empty or unknown --locales value is rejected with exit 2 rather than silently diffing nothing. Where verbatra check answers "how much has drifted" with counts, diff answers "which keys" with the lists.
Examples
# list the pending keys per locale (exit 1 if any are pending)
verbatra diff
# machine-readable key lists for tooling or a PR comment
verbatra diff --jsonExit codes
| Code | Meaning |
|---|---|
0 | no pending changes: no locale has a key to add or re-translate |
1 | pending changes: at least one locale has a missing or changed key (orphaned keys alone never produce 1) |
2 | could not run: a whole-run error, or a usage error (including an empty or unknown --locales value) |
Related
verbatra checkgives the per-locale counts behind these lists.verbatra translateapplies the pending changes;--pruneremoves the orphaned keys.- CI and exit codes shows diff in a pipeline.