Gå til hovedinnhold

kapi terms expand

kapi expand [bundle]

Ask a model for the other shapes each term takes in its own language (the plural, the definite form, a case ending) and write them onto the term as forms.

A declared form is how kapi recognises a rendering that changes the word: the Norwegian plural "varsler" is a use of the term "varsel" once the term lists it.

By default this asks about target terms, meaning every language except the source language, and leaves terms that already declare forms alone. It writes the bundle named on the command line, or the project's committed terms source, or else the store the terms flags select. It prints each proposal and the forms the filters dropped; review the diff before committing it.

Commandterms expand
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 terms expand --dry-run
Flags
FlagTypeDefaultDescription
--api-key stringAPI key for the AI provider
--color stringautocolorize output: auto, always, never
--credential stringsaved credential name (see 'kapi credentials list')
--dry-run boolfalseprint what would be added and write nothing
--file stringexplicit path to resource file
--jq stringfilter JSON output through a jq expression (implies --json)
--json boolfalseOutput in JSON format
--local boolfalseuse resource in current directory
--locale stringSliceonly terms in these locales; a bare language matches every region (default: every language except the source language)
--model stringAI model name
--name stringnamed resource in KAPI_HOME (e.g. --name project-terms)
--output-format stringOutput format: text (alias: table), json, yaml
--overwrite boolfalseask again about terms that already declare forms, and replace them
--project , -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--provider stringAI provider (default: anthropic)
--source-locale , -sstringlanguage the source terms are written in (default: the project's source language)
--text boolfalseOutput in text format (default)
More examples
kapi terms expand --locale nb --locale de
kapi terms expand .kapi/terms.json --overwrite

← Back to the Command Reference