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 app.kapi --no-tmFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| --format | string | xliff2 | bilingual output format (xliff2 | po | klz) |
| --no-tm | bool | false | skip TM pre-fill on extract |
| --only | string | restrict to a single content collection by name | |
| --out | string | merge-time output layout recorded in the .klz (e.g. 'l10n/{lang}/{name}.{ext}') | |
| --out-dir | string | out | directory for emitted bilingual files (relative to project) |
| --output, -o | string | write an ad-hoc .klz workspace from the given source files | |
| --pattern | string | extra glob pattern restricting which source files to include | |
| --project, -p | string | path to a .kapi project recipe (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 .klz (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 app.kapi --target-lang fr kapi extract -p app.kapi --target-lang fr,de,es kapi extract src/*.json -o work.klz --target-lang fr,qps # ad-hoc .klz workspace← Back to the Command Reference