kapi exec qa
kapi qa [files...]Check translation quality with deterministic rules or an LLM (select with --mode)
Try it (demo)
Demo mode — illustrative output from a built-in stub, not a real model. Install the CLI to run with your own API key.
kapi qa app.xliff --target-lang frFlags
| Flag | Type | Default | Description |
|---|---|---|---|
| --absolute-max-char-length | int | 255 | Maximum number of characters allowed in any target segment |
| --api-key | string | API key for the AI provider | |
| --charset | string | ISO-8859-1 | Name of the character set encoding to check against (e.g. ISO-8859-1) |
| --check-absolute-max-char-length | bool | false | Flag target segments that exceed an absolute character count limit |
| --check-charset | bool | false | Warn if a target character is not included in the specified character set encoding |
| --check-code-difference | bool | true | Verify that target segments have the same inline codes as source segments |
| --check-corrupted-characters | bool | true | Check for patterns indicating encoding corruption (mojibake |
| --check-double-spaces | bool | true | Check for double spaces in target text |
| --check-doubled-word | bool | true | Check for consecutive repeated words in target text |
| --check-empty-source | bool | true | Check for non-empty target when source is empty |
| --check-empty-target | bool | true | Check for empty target when source has content |
| --check-leading-whitespace | bool | true | Check for leading whitespace mismatches between source and target |
| --check-max-char-length | bool | true | Flag targets longer than a percentage of source character length |
| --check-max-words | bool | false | Flag target segments that exceed an absolute word count limit |
| --check-min-char-length | bool | true | Flag targets shorter than a percentage of source character length |
| --check-patterns | bool | true | Verify that source patterns have expected corresponding content in the target |
| --check-source-inconsistency | bool | false | Flag when different source texts share the same translation |
| --check-span-constraints | bool | true | Check non-deletable and non-cloneable span constraint violations |
| --check-target-inconsistency | bool | false | Flag when the same source text is translated differently across the run |
| --check-target-same-as-source | bool | true | Check when target text is identical to source text |
| --check-terminology | bool | false | Enable terminology checks |
| --check-trailing-whitespace | bool | true | Check for trailing whitespace mismatches between source and target |
| --checks | stringSlice | Quality checks to perform (e.g. terminology fluency accuracy consistency) | |
| --concurrency, -j | int | 0 | max parallel files (0 = auto) |
| --consistency-case-sensitive | bool | true | Whether consistency comparison is case-sensitive |
| --credential | string | saved credential name to use (see 'kapi credentials list') | |
| --doubled-word-exceptions | string | sie;vous;nous | Semicolon-separated list of words allowed to repeat (e.g. sie;vous;nous) |
| --encoding, -e | string | UTF-8 | input file encoding |
| --fail-on-unknown | bool | false | exit with error if any file cannot be processed (default: skip with warning) |
| --forbidden-chars | string | Characters that must not appear in target text (e.g. {}[]) | |
| --format, -f | string | override input format detection | |
| --json | bool | false | output results as JSON |
| --map, -m | stringArray | map glob pattern to format (e.g. '*.docx=okf_openxml:test') | |
| --max-char-length-above | int | 200 | Maximum allowed percentage of source length for long text |
| --max-char-length-below | int | 350 | Maximum allowed percentage of source length for short text |
| --max-char-length-break | int | 20 | Character count above which text is considered long for the maximum length check |
| --max-words | int | 0 | Maximum number of words allowed in any target segment |
| --min-char-length-above | int | 45 | Minimum required percentage of source length for long text |
| --min-char-length-below | int | 30 | Minimum required percentage of source length for short text |
| --min-char-length-break | int | 20 | Character count above which text is considered long for the minimum length check |
| --mode | string | rules | How to check quality: deterministic local rules, or an AI provider's review (Deterministic rules, AI review) |
| --model | string | AI model name | |
| --no-warn | bool | false | suppress warnings for skipped files |
| --output, -o | string | output path template (variables: {dir}, {name}, {ext}, {lang}) | |
| --output-dir | string | write outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout) | |
| --pack | bool | false | when transforming a .kpz, also eject the result to the .kpz (auto-pack) |
| --parallel-blocks | int | 0 | fan out block processing across N goroutines (0 = off) |
| --progress, -p | bool | false | show progress bar |
| --provider | string | anthropic | AI provider (Anthropic, OpenAI, Gemini, Azure OpenAI, Claude Code, Ollama, Demo (illustrative)) |
| --required-chars | string | Characters that must appear in target if present in source (e.g. punctuation) | |
| --source-lang | string | en | source language (e.g. en, en-US) |
| --strict | bool | false | alias for --fail-on-unknown |
| --strict-code-order | bool | false | Flag differences when codes appear in a different order between source and target |
| --target-lang | string | target language (e.g. fr, de-DE) | |
| --target-same-as-source-with-codes | bool | true | Include inline codes when comparing source and target for identity |
| --target-same-as-source-with-numbers | bool | true | Include number-only segments in same-as-source comparison |
| --trace | string | write flow trace JSON to file (for flow visualization) |
More examples
kapi qa app.xliff --target-lang fr --provider anthropic kapi qa app.xliff --target-lang de --json← Back to the Command Reference