Skip to main content

kapi merge

kapi merge

Materialize target-language files for a project, or apply bilingual files returned by a translator back onto the project's source locales.

With no -i in a project, merge writes the target-language files from the project block store: a process-only "kapi run" (in a project, no -o) commits its work as targets/<locale> overlays, and merge is the matching sink: it gives each source's translation the stored overlays and writes the target-language file from the source's skeleton.

With -i, merge applies one or more bilingual files returned by a translator to the translations of the project's sources, each written from its source's skeleton. Every block kapi extract wrote carries the revision of its translation and of its source at extraction, so merge needs nothing but the file: a block whose source changed since is reported stale and left out, and one whose translation changed in the project since is settled by the recipe's conflict policy (defaults.merge.conflict_policy). Mixed target languages in one batch are fine, and merge handles each input independently.

Commandmerge
Groupadvanced
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi merge # materialize target-language files from the project store
Flags
FlagTypeDefaultDescription
--input, -istringArrayinput XLIFF file, glob, or directory (repeatable)
--no-memory-updateboolfalseskip content-memory write-back
--no-restoreboolfalseskip restoring redacted originals from the batch vault
--output, -ostringoutput directory or template when merging a .kpz workspace
--progressstringstream progress events to stderr as NDJSON (value: jsonl); events use the flow-run event vocabulary
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
More examples
kapi merge -i out/app.en-to-fr.xliff
kapi merge -i file1.xliff -i file2.xliff
kapi merge -i vendor-return/ --no-memory-update
kapi merge work.kpz -o out/ # emit target-language files from a .kpz workspace

← Back to the Command Reference