Skip to main content

kapi formats explain

kapi explain <file>...

Resolve each file the way a run does and report the decision: the format that reads it, the engine the format belongs to (native, or a plugin such as okapi-bridge), the rule that chose the engine, the engines consulted in order and every format claiming the file's extension.

The recipe in scope supplies its declared plugins, its engine preference (defaults.engine) and its per-format pins (defaults.formats.<name>.engine); a content item that names the file's format is reported as such. Without a recipe the installed engines apply, native first. --engine ranks an engine above the recipe's preference, as it does on a run, and --format names the format outright: a reference such as html@okapi-bridge resolves to that engine's format for the same files.

Commandformats explain
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 formats explain src/messages.json
Flags
FlagTypeDefaultDescription
--enginestringformat engine for detected files: native or a plugin name (default: native, then plugins)
--format, -fstringname the format outright, as a run's --format does (name[@engine][:preset])
--project, -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
More examples
kapi formats explain --engine okapi-bridge docs/index.html
kapi formats explain -f html@okapi-bridge docs/index.html
kapi formats explain --json content/*.xml

← Back to the Command Reference