Frontmatter5 fields
type- Command Documentation
title- openknowledge export
description- Export a knowledge base to HTML, JSON, graph, or portable tar formats.
tagstimestamp
openknowledge export
Create a static site, normalized model, graph, or portable source archive. The source can be a local or connected knowledge base.
Targets
Usage
okn export html --out ./site Wiki
okn export html --plain --out ./plain-site Wiki
okn export json Wiki
okn export json --out ./bundle.json Wiki
okn export graph Wiki
okn export graph --type search --out ./search-graph.json Wiki
okn export tar --out ./wiki.tar.gz Wiki
| Option | Applies to | Default | Description |
|---|---|---|---|
key-or-path | all | . | Registry key or bundle root. |
--spec <version> | all | latest | OKF version. |
--out <path> | all | stdout for JSON/graph | Required directory for HTML. Required file for tar. |
--type source | search | graph | source |
--plain | HTML | off | Semantic HTML without viewer assets. |
--head-file, --head-html | HTML viewer | environment | Trusted head injection. |
--script-src <src> | HTML viewer | environment | Trusted script URL. Repeatable. |
HTML and tar require zero validation errors. HTML also requires publication permission in openknowledge.toml.
JSON and graph print schemaVersion: "1" documents to stdout by default. Use --out to write a file. The command replaces a machine output file only after complete serialization.
Unknown targets or unsupported flags are usage errors with exit status 2.