| title | llmwiki export - Export Your Wiki to Portable Formats |
|---|---|
| sidebarTitle | Export |
| description | llmwiki export converts your compiled wiki to llms.txt, JSON, JSON-LD, GraphML, Marp slides, or an Open Knowledge Format bundle. |
Your compiled wiki lives on disk as markdown files, but the knowledge inside it is useful beyond the local viewer and CLI. llmwiki export transforms your wiki into portable formats - a compact llms.txt file that fits in an LLM context window, a structured JSON envelope for programmatic consumers, a JSON-LD graph for semantic tooling, a GraphML file for graph visualization, a Marp slide deck for presentations, or an Open Knowledge Format bundle for exchange with other knowledge tools.
Export is a pure transformation of existing wiki content. It makes no LLM calls and doesn't modify any files in wiki/ or sources/ - only writing artifacts under dist/exports/ or the --out directory you choose for directory-style targets.
llmwiki export # export default single-file formats
llmwiki export --target <name> # export one format
llmwiki export --target json --project-id <id> # export JSON with a stable bridge ID
llmwiki export --target okf --out ./okf-bundle # export an Open Knowledge Format bundleWhen you omit --target, the single-file formats are exported in one pass. The okf target is opt-in because it writes a directory bundle.
| Target | Flag value | Output file | What it produces |
|---|---|---|---|
| llms.txt | llms-txt |
dist/exports/llms.txt |
Concise index per the llmstxt.org spec - page titles, summaries, and links. Compact enough to paste into an LLM context window. |
| llms-full.txt | llms-full-txt |
dist/exports/llms-full.txt |
Full content version of llms.txt - every page's complete body included. Larger but self-contained. |
| JSON | json |
dist/exports/wiki.json |
Structured JSON envelope with per-page metadata (kind, confidence, provenance, citations, aliases, freshness). See JSON export structure below. |
| JSON-LD | json-ld |
dist/exports/wiki.jsonld |
Schema.org JSON-LD graph for semantic web and knowledge graph tooling. |
| GraphML | graphml |
dist/exports/wiki.graphml |
Directed wikilink graph as XML. Import into Gephi, Cytoscape, or any GraphML-compatible tool. |
| Marp | marp |
dist/exports/wiki.md |
Marp presentation slide deck - one slide per concept page. |
| Open Knowledge Format | okf |
dist/exports/okf/ |
Directory bundle with index.md, per-page OKF docs, copied references, and log.md. Use this when another tool expects OKF-style markdown bundles. |
# Export just the llms.txt format
llmwiki export --target llms-txt
# Export the full-content version
llmwiki export --target llms-full-txt
# Export structured JSON
llmwiki export --target json
# Export JSON-LD for a knowledge graph pipeline
llmwiki export --target json-ld
# Export a GraphML graph for Gephi
llmwiki export --target graphml
# Export Marp slides (concept pages only)
llmwiki export --target marp --source concepts
# Export an Open Knowledge Format bundle
llmwiki export --target okf
# Export OKF to a specific directory
llmwiki export --target okf --out ./dist/okf-for-partner
# Export all default single-file formats at once
llmwiki exportThe --project-id flag embeds a stable identifier in the JSON export envelope. Downstream importers use this ID to derive deterministic external IDs for each page - so if you re-export and re-import, pages map to the same records rather than creating duplicates.
llmwiki export --target json --project-id my-research-wikiValid project IDs match the pattern /^[a-z0-9][a-z0-9-]{0,62}$/ - lowercase letters, digits, and hyphens, starting with a letter or digit, up to 63 characters. The export is aborted before writing any files if the ID is invalid.
The json target produces a wiki.json file with a top-level envelope and an array of page objects:
{
"version": 1,
"projectId": "my-research-wiki",
"exportedAt": "2026-06-05T09:14:02Z",
"pages": [
{
"path": "concepts/knowledge-compilation.md",
"slug": "knowledge-compilation",
"title": "Knowledge Compilation",
"kind": "concept",
"summary": "Techniques for converting knowledge representations into efficient forms.",
"confidence": 0.82,
"provenanceState": "merged",
"contradictedBy": [],
"citations": [
{ "source": "knowledge-compilation.md", "lines": [42, 58] }
],
"aliases": ["knowledge compiler", "compilation"],
"freshness": "fresh",
"body": "..."
}
]
}| Field | Type | Description |
|---|---|---|
path |
string | Relative path within the wiki (concepts/ or queries/) |
slug |
string | URL-safe page identifier |
title |
string | Page title from frontmatter |
kind |
string | Page kind: concept, entity, comparison, or overview |
summary |
string | One-line summary from frontmatter |
confidence |
number | null | LLM-reported confidence in the synthesized page (0–1) |
provenanceState |
string | extracted, merged, inferred, or ambiguous |
contradictedBy |
array | Slugs of pages that contradict this one |
citations |
array | Flattened list of { source, lines? } citations from the page body |
aliases |
array | Alternate names declared in frontmatter |
freshness |
string | fresh, stale, or orphaned based on source state |
body |
string | Full page body (markdown) |
When exporting Marp slides, you can narrow the deck to a specific page directory with --source:
llmwiki export --target marp --source concepts # only concept pages
llmwiki export --target marp --source queries # only saved query answers
llmwiki export --target marp # all pages (default)When --source narrows the deck, the export summary reports the filtered page count rather than the total wiki size.
The okf target writes a directory bundle instead of a single file:
llmwiki export --target okfBy default, the bundle is written to dist/exports/okf/. Use --out <dir> to choose another directory:
llmwiki export --target okf --out ./partner-bundleThe bundle layout is:
dist/exports/okf/
index.md
concepts/<slug>.md
queries/<slug>.md
<foreign/path>.md
references/<source-file>.md
log.md
index.mdis the bundle table of contents and carriesokf_version: "0.1"in frontmatter.- Native llmwiki pages export under
concepts/andqueries/. - Imported foreign pages re-export at their original bundle-relative
.mdpath when that path is safe, URL-safe, non-reserved, and uncontested. Unsafe or colliding paths fall back to the native slug path with a warning. references/contains cited source files that still exist undersources/and resolve inside that directory. Missing or unsafe references are listed as plain text in citations instead of becoming dangling links.log.mdtranslates llmwiki's activity journal into an OKF-style date-grouped log.
Each page document includes standard OKF fields (type, title, description, tags, timestamp) plus an x-llmwiki block with compiler metadata such as source files, citations, freshness, provenance, and a canonical content hash. Imported foreign OKF pages preserve their foreign type and producer-specific keys on re-export while refreshing the current llmwiki metadata.
See Open Knowledge Format guide for the import/export round-trip workflow.
The JSON export format is the on-ramp to Atomic Memory. The @atomicmemory/llmwiki bridge imports the wiki.json envelope as one Atomic Memory record per wiki page, preserving all advisory metadata under memory.metadata.llmwiki.*.
# 1. Compile and export
llmwiki compile
llmwiki export --target json --project-id my-research-wiki
# 2. Import into Atomic Memory (using the bridge package)
npx @atomicmemory/llmwiki import dist/exports/wiki.jsonSee the Atomic Memory bridge guide for the full compile → export → import → package workflow.