Skip to main content

kapi terms validate

kapi validate [bundle]

Check a set of terms and report what is wrong with them, or what a check will read differently from what the author meant.

Errors fail the command: a concept with no id or an id used twice, a term with no text or no locale, a status outside the lifecycle vocabulary.

Warnings do not. A target term in a language that inflects, with no forms declared, is recognised only where a rendering contains its exact spelling, so the plural "varsler" is not a use of "varsel" until the term lists it (see kapi terms expand). A form spelled the same as another term in the same language makes one word a use of two entries.

It reads the bundle named on the command line, or the project's committed terms source, or else the store the terms flags select.

Exit codes: 0 when there are no errors, 1 otherwise. With --json the result is {"valid", "source", "concepts", "problems": [{"concept_id", "locale", "term", "message", "warning"}]}.

Commandterms validate
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 terms validate
Flags
FlagTypeDefaultDescription
--colorstringautocolorize output: auto, always, never
--filestringexplicit path to resource file
--jqstringfilter JSON output through a jq expression (implies --json)
--jsonboolfalseOutput in JSON format
--localboolfalseuse resource in current directory
--namestringnamed resource in KAPI_HOME (e.g. --name project-terms)
--output-formatstringOutput format: text (alias: table), json, yaml
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--source-locale, -sstringlanguage the source terms are written in (default: the project's source language)
--textboolfalseOutput in text format (default)
More examples
kapi terms validate .kapi/terms.json --json

← Back to the Command Reference