okf is published as a self-contained, Native AOT single-file binary — no .NET runtime installation required on the target machine. Invocations are unchanged from the Rust binary it replaces.
| Command | Does |
|---|---|
| okf validate <bundle> | Check a bundle against OKF v0.1 conformance (§9); exits non-zero on failure |
| okf info <bundle> | Summarize a bundle — concepts, types, links, version |
| okf index <bundle> | (Re)generate every index.md in the bundle (§6) |
| 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 validate ./bundles/ga4
42 concept(s); 0 error(s), 0 warning(s), 0 info.
✓ conformant with OKF v0.1
$ okf info ./bundles/ga4
bundle: ./bundles/ga4
okf_version: 0.1
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.svgEverything 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.
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/ga4Because the binary is self-contained, the CI image needs no .NET runtime, no SDK, no package restore — copy the file, run it.
$ 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