my_bundle/cli.mdtype: Reference

Eight commands, one binary.

okf is published as a self-contained, Native AOT single-file binary — no .NET runtime installation required on the target machine.

##

Commands

§8–§11 — the whole surface
CommandDoes
okf validate <bundle>Check a bundle against OKF v0.2 conformance (§11); exits non-zero on failure
okf audit <bundle>Report trust (§5.3), lifecycle (§5.4) and staleness (§5.5) across the bundle; filter with --stale, --trust, --status, --type
okf info <bundle>Summarize a bundle — concepts, types, links, version
okf index <bundle>(Re)generate every index.md in the bundle (§8)
okf graph <bundle>Print the cross-link graph; --dot emits Graphviz DOT
okf parse <file>Parse one concept document and print its structure
okf fmt <file>Normalize a document by parse + re-serialize (-w writes in place)
okf render <bundle> --out <dir>Generate a self-contained, browsable static HTML site from the bundle
##

A session

what it looks like
$ okf validate ./bundles/ga4

42 concept(s); 0 error(s), 0 warning(s), 0 info.
✓ conformant with OKF v0.2

$ okf info ./bundles/ga4
bundle:     ./bundles/ga4
okf_version: 0.2
concepts:   42
index.md:   6
log.md:     1

types:
    22  Table
    12  Metric
     8  Dataset

links:      117 internal (3 broken)

$ okf graph ./bundles/ga4 --dot | dot -Tsvg > graph.svg

Everything the library exposes — permissive loading, broken-link tracking, byte-exact serialization — is the same engine underneath. okf fmt is the round-trip guarantee made tangible: parse + re-serialize, and unknown frontmatter keys come out untouched.

##

In CI

§11 — exit codes are the interface

okf validate exits non-zero when a bundle is not conformant, so validating knowledge is one line in any pipeline:

# .github/workflows/knowledge.yml — or any CI
okf validate ./bundles/ga4

Because the binary is self-contained, the CI image needs no .NET runtime, no SDK, no package restore — copy the file, run it.

##

Install it

winget on Windows, or Native AOT publish

On Windows, install via winget:

$ winget install Coderise.OKF4net

On any OS, build it from source:

$ git clone https://github.com/jchable/okf4net
$ dotnet publish src/OKF4net.Cli -c Release   # Native AOT, self-contained okf binary

contributing.md — build, test, and submit changes