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 verify <bundle> <id>…Record a review (§5.2) — adds or replaces a {by, at} stamp; clears the unverified worklist, not staleness
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)

Static HTML site generation moved to a separate binary, okf-render — okf is meant to stay small and dependency-free for CI, and the site generator pulls in a vendored copy of marked that a CI job running okf validate never executes.

##

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, install.sh on Linux/macOS, or Native AOT publish

On Windows, install via winget:

$ winget install Coderise.OKF4net

On Linux or macOS, install a release binary with the install script:

$ curl -sSL https://raw.githubusercontent.com/jchable/okf4net/main/packaging/install.sh | sh

It detects your OS/architecture, downloads the matching archive from the latest GitHub Release, verifies its SHA-256 checksum, and installs to /usr/local/bin (falling back to ~/.local/bin when that isn't writable — it never calls sudo). Pass --bin okf-render to install the site generator instead, --version <tag> to pin a release, or --dry-run to see what it would do first; -h lists every option.

On any OS, you can also 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