Frontmatter5 fields
type- Command Documentation
title- openknowledge ast
description- Print the parsed Open Knowledge Format document model as JSON.
tagstimestamp
openknowledge ast
Inspect the parser model that validation, search, listing, rendering, and exporters use. Use validate for pass or fail checks.
Usage
okn ast [key-or-path]
okn ast Wiki --spec 0.1
okn ast Wiki --out ast.json
| Option | Default | Description |
|---|---|---|
key-or-path | . | Registry key or bundle root. |
--spec <version> | latest | OKF spec version. |
--out <file> | stdout | Atomically write the JSON document. |
Output
The v1 AST contains the resolved root and spec version. It also contains Markdown documents in path order. Each document can include:
- Source identity and classification:
rel,id,kind, andreserved. - Complete content and body.
- Typed YAML frontmatter and compatible scalar values.
- Derived title, type, description, tags, resource, and bundle metadata.
- Markdown blocks, sections, headings, links, and code blocks.
- Read, UTF-8, frontmatter, and Markdown diagnostics.
{
"schemaVersion": "1",
"root": "/work/project-memory",
"specVersion": "0.1",
"documents": [
{
"rel": "AGENTS.md",
"id": "AGENTS",
"kind": "concept",
"metadata": {"type": "Agent Rules"}
}
]
}
The ast.schema.json file defines the contract. AST output is a detailed diagnostic format. export json provides a smaller normalized bundle model.