kapi extract
kapi extractEmit bilingual XLIFF 2.x (default) or PO files for each target locale declared in a kapi project, pre-filled from the project's translation memory.
Each invocation writes one batch of outputs under .kapi/cache/extractions/<batch-id>/ plus one bilingual file per source → target pair in --out-dir (default "out/").
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 extract -p kapi.yaml --no-tmFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| --force | bool | false | re-extract every file, ignoring the incremental reuse of unchanged sources |
| --format | string | xliff2 | bilingual output format (xliff2 | po | kpz) |
| --no-tm | bool | false | skip content-memory pre-fill on extract |
| --only | string | restrict to a single content collection by name | |
| --out | string | merge-time output layout recorded in the .kpz (e.g. 'translated/{lang}/{name}.{ext}') | |
| --out-dir | string | out | directory for emitted bilingual files (relative to project) |
| --output, -o | string | write an ad-hoc .kpz workspace from the given source files | |
| --pattern | string | extra glob pattern restricting which source files to include | |
| --progress | string | stream progress events to stderr as NDJSON (value: jsonl); events use the flow-run event vocabulary | |
| --project, -p | string | path to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted) | |
| --redact | bool | false | replace sensitive content with placeholders; originals stay in a local vault for merge |
| --redact-rules | string | path to a redaction rules YAML file (implies --redact) | |
| --target-lang | string | comma-separated target locales (default: all in recipe) | |
| --with-source | bool | false | embed raw source bytes in the .kpz (default: identity + skeleton only) |
| --xliff-version | string | XLIFF 2.x version to emit (2.0, 2.1, 2.2; default 2.2) |
More examples
kapi extract -p kapi.yaml --target-lang fr kapi extract -p kapi.yaml --target-lang fr,de,es kapi extract src/*.json -o work.kpz --target-lang fr,qps # ad-hoc .kpz workspace← Back to the Command Reference