okf-viz — OKF Bundle Visualizer
Renders any OKF bundle into one self-contained interactive index.html beside
index.md: a three-pane explorer with a Cytoscape graph (switchable layouts),
a navigator (tree + type/tag filters + search), and a rendered concept reader.
Setup
bash# Install the published binary (Go 1.24+) — no clone needed: go install github.com/xSAVIKx/okf-skills/skills/okf-viz@v0.1.0 # …or build from a clone of the repository: cd skills/okf-viz && go build -o okf-viz .
Commands
render
bash./okf-viz render --bundle <bundle-dir> [--out <file>] [--offline] [--theme system|light|dark] [--lang en] [--title <text>]
--bundle(required): the OKF bundle to visualize.--out: output path; default<bundle>/index.html.--offline: inline the graph library for a fully isolated file (no CDN).--theme: initial theme (defaultsystem, follows the OS); switchable in-page.--lang: UI-chrome language (defaulten).--title: page title (default derived from the bundle).--inline-all: always inline every concept body into the single file, regardless of size (the archival/shareable form).--threshold: concept count above which bodies are written lazily as sibling_okf/<id>.htmlfragments instead of inlined (default 150). Small bundles stay a single self-contained file; large bundles load a concept's body on selection. Re-running produces byte-identicalindex.htmland fragments. In-page, ER toggles the entity-relationship view and Cluster collapses directories into tappable super-nodes for large graphs.--diff <bundle>: highlight what changed versus another bundle revision — added / removed / changed concepts and edges, using each concept'scontent_hash(body-comparison fallback when a hash is absent). Deterministic and byte-stable.--bundles <a,b,…>: federate additional bundles into one view; each bundle's node IDs are namespaced so identical IDs across bundles stay distinct. Single-bundle output is unchanged.- In-page, Coverage recolors nodes by enrichment state, and PNG / JSON export the graph and the visible subgraph. The three panes carry ARIA roles and the graph is keyboard-traversable (focus it, then arrow between neighbors, Enter to select).
schema
bash./okf-viz schema
Prints the machine-readable JSON used by okf-mcp to expose okf-viz__render.


