kapi apply
kapi apply [flags] [CHANGESET]Apply a typed change-set: the write sibling of 'kapi inspect'. Each entry is one reviewed change — a content edit, an asset edit (term, content-memory pair, brand rule, recipe field), or a review decision (kind:"review"). Content edits land through the same byte-faithful round-trip the engine's writers use (structure and inline codes preserved), drift-guarded by content_hash; asset edits are written into their committed source artifact and the existing import compiles them into the cache; a review decision is recorded in the project state store.
A content memory pair (kind:"memory") is recycle leverage for future translation — it does not promote a unit to reviewed. To approve a translated unit, use a kind:"review" entry addressed by its file/id/locale (as 'kapi status --review' lists it), with status "reviewed" (default) or "signed-off"; the decision lands in the project state store (defaults.state, default .kapi-state.json) and is bound to the translation's content hash, so a later edit drops the unit back below reviewed.
The change-set is JSONL (one entry per line), read from CHANGESET or, with no argument or "-", from standard input. Content entries name their own file, so apply writes those files in place; --diff previews the content changes and writes nothing. No AI provider is required.
Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.
kapi inspect report.docx --jsonl | edit-the-text | kapi apply| Flag | Type | Default | Description |
|---|---|---|---|
| --diff | bool | false | preview content changes as a unified diff and write nothing |
| --encoding | string | UTF-8 | input/output encoding |
| --format, -f | string | input/output format for content files (default: auto-detect) | |
| --in-place, -i | string | keep a backup of edited content files with --in-place=.bak | |
| --json | bool | false | print the apply report as JSON |
| --source-lang | string | en | source language (e.g. en, en-US) |
kapi apply changeset.jsonl kapi apply changeset.jsonl --diff kapi status --review --json | approve-units | kapi apply kapi apply changeset.jsonl --in-place=.bak← Back to the Command Reference