BundleDex / Guides / Convert Docs to OKF

How to Convert Existing Documentation to OKF Format

Transform your existing docs, wikis, and knowledge bases into structured OKF bundles that AI agents can discover, load, and use. From automated tools to manual methods.

Updated July 15, 2026 ~10 min read

Conversion Overview

The Open Knowledge Format is designed to be easy to adopt — if you already have markdown documentation, you're most of the way there. OKF bundles are just markdown files with YAML frontmatter, organized into a standard directory structure. This guide covers four methods for converting existing documentation into OKF format, from fully automated to completely manual.

Quick Start: If you have a directory of markdown files, install OKFy and run okfy convert ./docs/ ./okf-bundle/. You'll have a valid OKF bundle in seconds.

Method 1: Automated Conversion with OKFy

OKFy

66 ⭐

Turn docs into agent-readable knowledge bundles using Open Knowledge Format (OKF)

OKFy is the most popular automated conversion tool for the OKF ecosystem. It takes any directory of markdown files and transforms them into a properly structured OKF bundle.

Installation & Usage

# Install OKFy
npm install -g okfy
# or
pip install okfy

# Convert a docs directory to an OKF bundle
okfy convert ./my-docs/ ./my-okf-bundle/

# Output: my-okf-bundle/
# ├── index.md       (auto-generated with frontmatter)
# ├── SPEC.md        (describes bundle structure)
# └── concepts/      (your docs, reorganized)
#     ├── getting-started.md
#     ├── api-reference.md
#     └── ...

What OKFy Does

  • Scans your directory for markdown files
  • Generates index.md with YAML frontmatter (name, description, okf_version)
  • Creates SPEC.md describing the bundle contents
  • Organizes files into concepts/ directory
  • Adds frontmatter to each concept file (title, description, type)
  • Generates a bundle.json manifest for machine readability

Method 2: Convert Obsidian Vaults with okf-loom

okf-loom

7 ⭐

Toolkit for turning Markdown docs bundles into validated OKF knowledge graphs, with a local studio, static site output, and agent-friendly CLI.

If you maintain an Obsidian vault, okf-loom converts it into an OKF bundle while preserving your wiki links, tags, and frontmatter. This is the fastest way to make your personal knowledge base available to AI agents.

Usage

# Convert an Obsidian vault to OKF
okf-loom convert ./my-vault/ ./my-okf-bundle/

# Options:
# --preserve-tags     Keep Obsidian tags as OKF tags
# --flatten-links     Convert wiki links [[link]] to OKF cross-references
# --add-frontmatter   Generate YAML frontmatter for all notes

okf-loom handles Obsidian-specific features like [[wiki links]], #tags, and nested folder structures, mapping them to OKF's concept-based architecture.

Method 3: Manual Conversion

For small documentation sets or when you want full control, manual conversion is straightforward:

1

Create the directory structure

my-okf-bundle/
├── index.md
├── SPEC.md
└── concepts/
    └── ...your markdown files here
2

Write index.md with YAML frontmatter

---
name: My Knowledge Bundle
description: A curated collection of domain knowledge
version: 1.0.0
okf_version: "0.1"
tags: [my-domain, knowledge-base]
---
3

Move your markdown files into concepts/

Each file gets YAML frontmatter with title, type, and optional tags:

---
title: Getting Started
type: guide
tags: [tutorial, beginner]
---

Content of your documentation page...
4

Add cross-links

Link related concepts using OKF references: [see also](related-concept-slug)

5

Validate the bundle

Run the OKF Conformance tool to verify your bundle structure.

Method 4: Agent-Assisted Conversion

AI coding agents can help automate the conversion process. Here's how to use them:

Using Claude Code or Cursor

Simply point your agent at a directory of documentation and ask it to convert to OKF format. Most coding agents understand the OKF specification and can generate valid bundles:

# Example prompt for Claude Code:
"Convert the documentation in ./docs/ into an OKF bundle at ./okf-bundle/.
Create index.md with proper frontmatter, organize files into concepts/,
and add YAML frontmatter to each concept file."

Using Gemini OKF Builder

The Gemini OKF Builder is specifically designed to create OKF-compatible bundles using AI. It can analyze existing content structures and generate well-organized OKF bundles automatically.

Using Git2OKF for Git-Based Repos

Git2OKF

3 ⭐

Transform Git repositories into Open Knowledge Format (OKF) for AI agents, semantic code understanding, and knowledge graph generation.

For repositories with extensive documentation, git2okf analyzes your git history and documentation files to create an OKF bundle that captures the evolution of your knowledge base.

Best Practices

  • Start small: Convert your most important documentation first. You can always add more bundles later.
  • Use consistent naming: Use kebab-case for concept file names (e.g., api-reference.md).
  • Add YAML frontmatter: Every concept file should have at minimum a title and type field.
  • Cross-link related content: Use OKF references to connect related concepts within your bundle.
  • Validate after conversion: Always run the conformance checker after conversion to catch structural issues.
  • Add the okf topic: Tag your GitHub repository with okf so BundleDex can discover it.
  • Version your bundle: Update the version field in index.md when you make significant changes.

Frequently Asked Questions

Can I convert non-markdown documentation to OKF?

Yes, but with an extra step. First convert your docs to markdown using tools like pandoc, then use OKFy or manual methods to create the OKF bundle structure.

Will conversion preserve my existing cross-references?

OKFy and okf-loom preserve cross-references where possible. For manual conversion, you'll need to update links to use OKF's referencing format.

How do I keep my OKF bundle in sync with source docs?

Set up a CI pipeline that re-runs conversion on every source change. OKFy supports idempotent conversion, so running it multiple times is safe.

Can I split one large documentation set into multiple OKF bundles?

Yes. OKF bundles are composable. Create separate bundles for different topics and cross-link them. This is actually recommended for large knowledge bases.

Ready to Convert?

Browse conversion tools on BundleDex, or submit your newly converted bundle.

Browse Bundles → Submit Your Bundle →