OKF CLI | Open Knowledge Format Bundles for LLM Wikis | Run your first OKF bundle.

Guide

Run your first OKF bundle.

Install the CLI once, run the pinned sample, use search as a progressive retrieval step for agent workflows, then switch the same workflow to your own local source path.

01

Install once

Pick npm or bun. After that the command is just okf.

02

Start with the pinned sample

Use the fixed repository and commit so the first run stays reproducible, then use metadata search to stage wiki context before opening the workbench.

03

Then switch to your docs

Keep the same flow and replace only the source path, profile, and the retrieval query you want agents to use.

Step 1

Install the CLI

Install the published package once. Pick npm or bun, not both. After that every command below runs as okf.

CLI

npm install

Choose this path if npm is your package manager. Run this command or the bun command below, not both.

npm i -g @fastrag/okf

or bun install

Choose this instead if bun is already part of your local workflow. You only need one global install path.

bun install -g @fastrag/okf

Step 2

Run the pinned GitHub sample

Use the pinned repository and commit for the first pass. Convert, validate, run metadata search as progressive retrieval, then generate and serve the workbench locally.

CLI

convert

Read mattpocock/dictionary-of-ai-coding at the pinned commit and write the first OKF bundle into ./out/okf.

okf convert mattpocock/dictionary-of-ai-coding ./out/okf --profile ./starter-profile.en.yaml --ref 251fec7ec3b08059e4203863024e6123090a54e3

validate

Check the generated bundle at ./out/okf before you move on to browser output.

okf validate ./out/okf

search

Run metadata search against ./out/okf as the lightweight retrieval step for agent workflows before opening the workbench or loading fuller concept context.

okf search --bundle ./out/okf agent

viewer generate

Generate the static workbench files into ./out/workbench so the browser UI is ready to serve.

okf viewer generate --bundle ./out/okf --out ./out/workbench

viewer serve

Start a local preview server for ./out/workbench so you can inspect the workbench in the browser.

okf viewer serve --dir ./out/workbench

Step 3

Switch to your local source path

When the sample flow looks right, replace only the source path, profile, and retrieval query. The rest of the sequence stays the same.

CLI

convert

Replace the sample repository with your own local source path at ./local-docs and write the bundle to ./out/okf.

okf convert ./local-docs ./out/okf --profile ./starter-profile.en.yaml

validate

Run the same structural check against the local bundle output before generating browser files.

okf validate ./out/okf

search

Replace <query> with the title, path, type, description term, or tag your agents should use for progressive retrieval before loading fuller bundle context.

okf search --bundle ./out/okf <query>

viewer generate

Build the browser workbench for the local bundle into ./out/workbench.

okf viewer generate --bundle ./out/okf --out ./out/workbench

viewer serve

Serve the generated local workbench the same way as the pinned sample.

okf viewer serve --dir ./out/workbench