Developer CLI

OKF CLI: convert and validate Open Knowledge Format.

The CLI uses the same OKF core as the web workbench, so Markdown conversion, bundle indexes, validation scores, and report output stay consistent across local, CI, and browser workflows.

Generate locally, validate in CI, then inspect the bundle.

Use the OKF generator for a first bundle, run the CLI validator before merging, and open the browser workbench when you need a human-readable OKF viewer.

Local workflows for docs teams and CI.

Convert a folder

Run this from the repository root after installing dependencies.

node scripts/okf-converter.mjs convert ./docs --out ./okf

Convert one file

Run this from the repository root after installing dependencies.

node scripts/okf-converter.mjs convert ./README.md --out ./okf

Validate for CI

Run this from the repository root after installing dependencies.

node scripts/okf-converter.mjs validate ./okf --json

Export to a GitHub repo branch

Run this from the repository root after installing dependencies.

node scripts/okf-converter.mjs github-export ./okf --repo ../docs-repo --target okf --branch okf-export

Open a pull request with GitHub CLI

Run this from the repository root after installing dependencies.

node scripts/okf-converter.mjs github-export ./okf --repo ../docs-repo --target okf --branch okf-export --open-pr