kapi inspect
kapi inspect [flags] [FILE...]Parse each file into one record per content block: the text, a stable content-hash anchor, and the block's structural role (heading, list-item, table-cell, …) and nesting level. Any format — a Word document, a JSON catalog, Markdown, HTML — yields the same shape, so an AI agent or RAG pipeline can read content, retrieve against the anchors, and write edits back to the same blocks.
Prints a JSON array by default; --output-format yaml emits a YAML sequence, and --jsonl streams one JSON object per line (JSONL) for piping into an ingestion pipeline.
Positional paths take glob patterns (** recurses) and directories, expanded
by kapi itself. Inside a project, no FILE means the project's tracked content;
FILE "-" reads standard input.
Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.
kapi inspect report.docx| Flag | Type | Default | Description |
|---|---|---|---|
| --encoding | string | UTF-8 | input encoding |
| --format, -f | string | input format (default: auto-detect by extension/content) | |
| --jsonl | bool | false | stream one JSON object per line (JSONL) instead of a JSON array |
| --project | stringSlice | also render each block to these target formats (html, markdown, asciidoc) under "projected" | |
| --source-lang | string | en | source language (e.g. en, en-US) |
kapi inspect --jsonl 'docs/**/*.md' | jq .content_hash kapi inspect --output-format yaml report.dclg.xml kapi inspect report.docx --project html,markdown # each block rendered per formatcat page.html | kapi inspect -f html← Back to the Command Reference