okf-schemaΒΆ

GitHub

okf-schema is a CLI tool and Python library for bringing structure and validation to OKF (Open Knowledge Format) bundles.

OKF is a markdown-based knowledge format where each concept is a markdown file with YAML frontmatter. This package provides validation against JSONSchema, formatting while preserving comments, and bundle management utilities. See this official, draft spec.

OKF-Schema is highly opinionated: it enforces a stricter model than the spec, and it is not guaranteed that every valid OKF bundle will pass okf-schema validation.

OKF-Schema bundles are OKF-compliant. See OKF-Schema vs. OKF Spec for details.

Links to source code: gsemet/okf-schema

πŸ“¦ Installation

How to install okf-schema.

Installation
πŸš€ Getting Started

Create your first bundle and learn the core workflow in under 10 minutes.

Getting Started
πŸ•ΈοΈ Tutorials

Build a fictional data-platform knowledge base, see how cross-links form a navigable graph, and query it from the CLI and Python API.

Tutorials
πŸ“– How-To Guides

Task-oriented recipes: validate in CI, write custom schemas, migrate existing docs, and more.

How-To Guides
πŸ“š Reference

Complete API and CLI documentation. Look up commands, functions, and data models.

Reference
πŸ’‘ Design Principles

Understand the design philosophy behind OKF-Schema and how it relates to the OKF specification.

Explanations
πŸ—„οΈ Opinionated Knowledge Base

Learn why the okfkb KB format exists, how agents read frontmatter-first markdown, and how links and backlinks keep the graph navigable.

OKF-KB Design Choices