Open Knowledge CLI Documentation
Frontmatter5 fields
type
Command Documentation
title
openknowledge export
description
Export a knowledge base to HTML, JSON, graph, or portable tar formats.
timestamp

openknowledge export

Create a static site, normalized model, graph, or portable source archive. The source can be a local or connected knowledge base.

Targets

TargetOutputReference
htmlStatic viewer or plain semantic HTML.HTML
jsonNormalized parsed bundle model.JSON
graphAuthored link graph or derivative search graph.Graph
tarReproducible portable source archive.Tar

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
OptionApplies toDefaultDescription
key-or-pathall.Registry key or bundle root.
--spec <version>alllatestOKF version.
--out <path>allstdout for JSON/graphRequired directory for HTML. Required file for tar.
--type sourcesearchgraphsource
--plainHTMLoffSemantic HTML without viewer assets.
--head-file, --head-htmlHTML viewerenvironmentTrusted head injection.
--script-src <src>HTML viewerenvironmentTrusted 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.

Powered by OpenKnowledge.sh