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"}]}.
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| Flag | Type | Default | Description |
|---|---|---|---|
| --color | string | auto | colorize output: auto, always, never |
| --file | string | explicit path to resource file | |
| --jq | string | filter JSON output through a jq expression (implies --json) | |
| --json | bool | false | Output in JSON format |
| --local | bool | false | use resource in current directory |
| --name | string | named resource in KAPI_HOME (e.g. --name project-terms) | |
| --output-format | string | Output format: text (alias: table), json, yaml | |
| --project, -p | string | path to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted) | |
| --source-locale, -s | string | language the source terms are written in (default: the project's source language) | |
| --text | bool | false | Output in text format (default) |
kapi terms validate .kapi/terms.json --json← Back to the Command Reference