Skip to main content

kapi exec qa

kapi qa [files...]

Check translation quality with deterministic rules or an LLM (select with --mode)

Commandexec qa
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 fr
Flags
FlagTypeDefaultDescription
--absolute-max-char-lengthint255Maximum number of characters allowed in any target segment
--api-keystringAPI key for the AI provider
--charsetstringISO-8859-1Name of the character set encoding to check against (e.g. ISO-8859-1)
--check-absolute-max-char-lengthboolfalseFlag target segments that exceed an absolute character count limit
--check-charsetboolfalseWarn if a target character is not included in the specified character set encoding
--check-code-differencebooltrueVerify that target segments have the same inline codes as source segments
--check-corrupted-charactersbooltrueCheck for patterns indicating encoding corruption (mojibake
--check-double-spacesbooltrueCheck for double spaces in target text
--check-doubled-wordbooltrueCheck for consecutive repeated words in target text
--check-empty-sourcebooltrueCheck for non-empty target when source is empty
--check-empty-targetbooltrueCheck for empty target when source has content
--check-leading-whitespacebooltrueCheck for leading whitespace mismatches between source and target
--check-max-char-lengthbooltrueFlag targets longer than a percentage of source character length
--check-max-wordsboolfalseFlag target segments that exceed an absolute word count limit
--check-min-char-lengthbooltrueFlag targets shorter than a percentage of source character length
--check-patternsbooltrueVerify that source patterns have expected corresponding content in the target
--check-source-inconsistencyboolfalseFlag when different source texts share the same translation
--check-span-constraintsbooltrueCheck non-deletable and non-cloneable span constraint violations
--check-target-inconsistencyboolfalseFlag when the same source text is translated differently across the run
--check-target-same-as-sourcebooltrueCheck when target text is identical to source text
--check-terminologyboolfalseEnable terminology checks
--check-trailing-whitespacebooltrueCheck for trailing whitespace mismatches between source and target
--checksstringSliceQuality checks to perform (e.g. terminology fluency accuracy consistency)
--concurrency, -jint0max parallel files (0 = auto)
--consistency-case-sensitivebooltrueWhether consistency comparison is case-sensitive
--credentialstringsaved credential name to use (see 'kapi credentials list')
--doubled-word-exceptionsstringsie;vous;nousSemicolon-separated list of words allowed to repeat (e.g. sie;vous;nous)
--encoding, -estringUTF-8input file encoding
--fail-on-unknownboolfalseexit with error if any file cannot be processed (default: skip with warning)
--forbidden-charsstringCharacters that must not appear in target text (e.g. {}[])
--format, -fstringoverride input format detection
--jsonboolfalseoutput results as JSON
--map, -mstringArraymap glob pattern to format (e.g. '*.docx=okf_openxml:test')
--max-char-length-aboveint200Maximum allowed percentage of source length for long text
--max-char-length-belowint350Maximum allowed percentage of source length for short text
--max-char-length-breakint20Character count above which text is considered long for the maximum length check
--max-wordsint0Maximum number of words allowed in any target segment
--min-char-length-aboveint45Minimum required percentage of source length for long text
--min-char-length-belowint30Minimum required percentage of source length for short text
--min-char-length-breakint20Character count above which text is considered long for the minimum length check
--modestringrulesHow to check quality: deterministic local rules, or an AI provider's review (Deterministic rules, AI review)
--modelstringAI model name
--no-warnboolfalsesuppress warnings for skipped files
--output, -ostringoutput path template (variables: {dir}, {name}, {ext}, {lang})
--output-dirstringwrite outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout)
--packboolfalsewhen transforming a .kpz, also eject the result to the .kpz (auto-pack)
--parallel-blocksint0fan out block processing across N goroutines (0 = off)
--progress, -pboolfalseshow progress bar
--providerstringanthropicAI provider (Anthropic, OpenAI, Gemini, Azure OpenAI, Claude Code, Ollama, Demo (illustrative))
--required-charsstringCharacters that must appear in target if present in source (e.g. punctuation)
--source-langstringensource language (e.g. en, en-US)
--strictboolfalsealias for --fail-on-unknown
--strict-code-orderboolfalseFlag differences when codes appear in a different order between source and target
--target-langstringtarget language (e.g. fr, de-DE)
--target-same-as-source-with-codesbooltrueInclude inline codes when comparing source and target for identity
--target-same-as-source-with-numbersbooltrueInclude number-only segments in same-as-source comparison
--tracestringwrite 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