OKFy — The Fastest Way to Create OKF Bundles from Documentation
OKFy is a Python CLI tool that converts documentation, README files, and markdown collections into AI-ready Open Knowledge Format (OKF) bundles. With 59 stars on GitHub, it's the most popular dedicated OKF conversion tool — and it doubles as an MCP server so AI agents can invoke OKF operations directly.
What Is OKFy?
OKFy (pronounced "OK-fy") is an open-source Python CLI tool by 0dust that automates the creation of Open Knowledge Format (OKF) bundles from your existing documentation. Instead of manually structuring directories, writing YAML frontmatter, and creating concept files, you point OKFy at your docs and it generates a fully conformant OKF bundle in seconds.
OKFy is the most-starred dedicated OKF conversion tool on BundleDex with 59 GitHub stars, licensed under MIT, and actively maintained (last updated July 2026).
Key Features
- Automated Conversion — Point OKFy at a directory of markdown files and get a validated OKF bundle with proper structure, frontmatter, and cross-links.
- MCP Server — Run
okfy serveto expose OKF operations as a Model Context Protocol server, letting AI agents manage bundles directly. - Single-File Support — Convert a single README or markdown file into a complete OKF bundle.
- Dry-Run Mode — Preview what OKFy will create without writing any files (
--dry-run). - OKF v0.1 Conformant — Generates bundles that follow the OKF specification and work with any OKF-compatible AI agent.
- Agent-Native — Designed for AI agent workflows. Claude Code, Cursor, and OpenCode can invoke OKFy to manage knowledge bundles.
Key insight: OKFy bridges the gap between "I have documentation" and "my AI agent can use it." By automating the conversion, it eliminates the biggest barrier to OKF adoption — manual bundle creation.
Installation
OKFy is a Python package available via pip. It requires Python 3.8 or later.
Method 1: Install via pip (Recommended)
# Install globally
pip install okfy
# Verify installation
okfy --version Method 2: Install via pipx (Isolated)
pipx installs OKFy in its own isolated environment, avoiding dependency conflicts:
# Install pipx if you don't have it
pip install pipx
pipx ensurepath
# Install OKFy
pipx install okfy
# Verify
okfy --version Method 3: Install from Source
# Clone the repository
git clone https://github.com/0dust/OKFy.git
cd OKFy
# Install in development mode
pip install -e .
# Or build and install
python -m build
pip install dist/*.whl System Requirements
- Python 3.8 or later
- pip (Python package manager)
- Git (optional, for source installation)
- No external dependencies — OKFy bundles are plain markdown files
Creating Your First OKF Bundle with OKFy
Let's walk through converting a documentation directory into an OKF bundle using OKFy. This is the fastest path from "I have docs" to "my AI agent has knowledge."
Step 1: Prepare Your Documentation
OKFy works best with markdown files. If your docs are in a different format (reStructuredText, plain text, HTML), convert them to markdown first. For this example, assume you have a directory like this:
my-docs/
├── README.md
├── getting-started.md
├── api-reference.md
├── configuration.md
└── troubleshooting.md Step 2: Run the Conversion
Point OKFy at your docs directory and specify an output directory for the bundle:
# Basic conversion
okfy convert ./my-docs --output ./my-okf-bundle
# Preview what will be created (dry run)
okfy convert ./my-docs --output ./my-okf-bundle --dry-run Step 3: What OKFy Creates
After conversion, your output directory will have a complete OKF bundle structure:
my-okf-bundle/
├── index.md # Entrypoint with auto-generated frontmatter
├── concepts/
│ ├── getting-started.md
│ ├── api-reference.md
│ ├── configuration.md
│ └── troubleshooting.md
└── .okf/
└── okf.yaml # Bundle manifest (OKF version, metadata) Step 4: Convert a Single File
You can also convert a single README or markdown file into a minimal OKF bundle:
# Convert a single README
okfy convert README.md --output ./single-bundle
# This creates:
# single-bundle/
# ├── index.md
# ├── concepts/
# │ └── readme.md
# └── .okf/
# └── okf.yaml Step 5: Validate Your Bundle
After conversion, validate the bundle to ensure it's OKF-conformant. You can use any OKF validator:
# Option A: Use OKFy's built-in validation (if available)
okfy validate ./my-okf-bundle
# Option B: Use openknowledge CLI
okf validate ./my-okf-bundle
# Option C: Manual check
# ✓ index.md exists with YAML frontmatter
# ✓ concepts/ directory has at least one file
# ✓ .okf/okf.yaml manifest present
# ✓ All cross-links resolve Step 6: Use with Your AI Agent
Point your AI agent at the bundle directory:
# Claude Code
claude /path/to/my-okf-bundle
# Cursor
cursor /path/to/my-okf-bundle
# OpenCode
opencode /path/to/my-okf-bundle Using OKFy as an MCP Server
One of OKFy's most powerful features is its MCP server mode. Instead of running CLI commands manually, your AI agent can invoke OKFy operations directly through the Model Context Protocol.
Starting the MCP Server
# Start OKFy as an MCP server
okfy serve
# The server starts on the default MCP port
# AI agents can now discover and invoke OKFy operations Configuring Your AI Agent to Use OKFy MCP
Add OKFy to your agent's MCP configuration. Example for Claude Code:
# In your Claude Code MCP config:
{
"mcpServers": {
"okfy": {
"command": "okfy",
"args": ["serve"]
}
}
} What AI Agents Can Do via OKFy MCP
When connected via MCP, AI agents can:
- Convert docs to bundles — "Convert my docs/ directory to an OKF bundle"
- Validate bundles — "Check if this bundle is OKF conformant"
- List concepts — "Show me all concepts in this OKF bundle"
- Create concept files — "Add a new concept about prompt engineering"
- Update frontmatter — "Update the description and tags for this bundle"
Agent-native workflow: Instead of you running CLI commands, your AI agent handles the entire bundle lifecycle — from creation to validation to publishing — using OKFy's MCP server. This is the future of AI agent knowledge management.
OKFy vs okf-builder — Which Tool Should You Use?
The OKF ecosystem has two main tools for creating bundles: OKFy (conversion-focused) and okf-builder (authoring-focused). Here's how to choose:
| Feature | OKFy | okf-builder |
|---|---|---|
| Best for | Converting existing docs to OKF | Creating new bundles from scratch |
| Stars | ★59 | ★4 |
| Language | Python | JavaScript (Node.js) |
| Install | pip install okfy | npm i -g okf-builder |
| Approach | Automated: scan docs → generate bundle | Interactive: guided prompts → build bundle |
| MCP Server | ✅ Built-in (okfy serve) | ❌ Not available |
| Dry-Run | ✅ --dry-run flag | ❌ Not available |
| OKF Version | v0.1 | v0.1 |
| License | MIT | MIT |
When to Use OKFy
- You already have documentation in markdown format
- You want to convert in bulk — multiple files at once
- You need MCP server integration for agent-native workflows
- You want a one-command solution with minimal interaction
When to Use okf-builder
- You're creating a brand-new bundle from scratch
- You want guided, step-by-step authoring
- You prefer interactive prompts over automated scanning
- You're already in the Node.js ecosystem
Real-World Use Cases
Here are concrete examples of how teams use OKFy to create AI-ready knowledge bundles:
1. Open-Source Project Documentation
Scenario: You maintain an open-source library with a docs/ directory full of markdown files. Users want their AI coding agents to understand your library.
# Convert your docs to an OKF bundle
okfy convert ./docs --output ./okf-bundle
# Push to GitHub
cd okf-bundle
git init && git add -A && git commit -m "OKF bundle for my-library"
git push
# Submit to BundleDex
# → Users can now point Claude Code at your bundle 2. Internal Company Knowledge Base
Scenario: Your team has a wiki with onboarding guides, architecture docs, and runbooks. You want your AI coding agents to have access to this knowledge.
# Export wiki to markdown, then convert
okfy convert ./wiki-export --output ./company-knowledge
# Run as MCP server for your team
okfy serve
# Now every developer's AI agent can query company knowledge
# through the MCP protocol 3. CI/CD Pipeline Integration
Scenario: You want your docs to automatically stay in sync as an OKF bundle on every push.
# .github/workflows/okf-sync.yml
name: Sync OKF Bundle
on:
push:
paths:
- 'docs/**'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OKFy
run: pip install okfy
- name: Convert docs to OKF
run: okfy convert ./docs --output ./okf-bundle
- name: Validate
run: okfy validate ./okf-bundle
- name: Commit OKF bundle
run: |
git config user.name "okf-bot"
git config user.email "bot@example.com"
git add okf-bundle/
git diff --staged --quiet || git commit -m "chore: sync OKF bundle"
git push 4. Agent-Native Documentation Management
Scenario: You run OKFy as an MCP server. Your AI agent (Claude Code, Cursor) manages your documentation autonomously — creating, updating, and validating bundles without manual intervention.
# You: "OKFy, serve"
okfy serve
# Claude Code (via MCP): "I'll convert the docs/ to OKF and validate"
# Claude Code: "found 12 markdown files, generated bundle with 12 concepts"
# Claude Code: "all validations passed. bundle ready for BundleDex submission" Frequently Asked Questions About OKFy
What is OKFy and what does it do?
OKFy is a Python CLI tool that converts existing documentation, README files, and markdown collections into Open Knowledge Format (OKF) bundles. It automates the process of creating agent-ready knowledge packages from your docs, and also functions as an MCP server so AI agents can invoke OKF operations directly. It's the most-starred dedicated OKF conversion tool with 59 stars on GitHub.
How do I install OKFy?
Install OKFy via pip: pip install okfy. For an isolated installation, use pipx: pipx install okfy. You can also clone the repository from GitHub at github.com/0dust/OKFy and install from source. OKFy requires Python 3.8 or later.
How do I convert documentation to an OKF bundle with OKFy?
Run okfy convert ./your-docs --output ./okf-bundle. OKFy will scan your markdown files, generate proper YAML frontmatter, create the required OKF directory structure (index.md, concepts/, .okf/), and produce a validated bundle ready for AI agents. You can also convert a single file with okfy convert README.md --output ./bundle. Use --dry-run to preview the output first.
Can OKFy run as an MCP server?
Yes. Run okfy serve to start OKFy as a Model Context Protocol (MCP) server. This allows AI agents like Claude Code and Cursor to invoke OKF operations directly — creating, converting, and validating bundles without manual CLI commands. Configure your MCP client to connect to the OKFy server for agent-native bundle management. See the MCP Server section above for configuration details.
What's the difference between OKFy and okf-builder?
OKFy is designed for converting existing documentation into OKF bundles — it scans your markdown files and generates the bundle automatically. okf-builder is designed for creating new bundles from scratch — it walks you through interactive prompts to build each concept. OKFy has 59 stars (vs 4 for okf-builder), supports MCP server mode, and offers a dry-run flag. Use OKFy when you have existing docs; use okf-builder when creating something new. See the comparison table above.
Is OKFy OKF conformant?
Yes, OKFy is OKF v0.1 conformant. Bundles generated by OKFy follow the Open Knowledge Format specification and can be used with any OKF-compatible AI agent (Claude Code, Cursor, OpenCode, etc.). OKFy generates proper YAML frontmatter, the required directory structure (index.md, concepts/), and the .okf/okf.yaml manifest.
What AI agents can use bundles created with OKFy?
Bundles created with OKFy work with any AI agent that supports OKF bundles, including Claude Code, Cursor, and OpenCode. Since OKFy also runs as an MCP server, agents can additionally invoke OKF operations directly — creating, converting, and validating bundles at runtime. Just point your agent at the bundle directory and it will discover and load the knowledge automatically.
Can I use OKFy in CI/CD pipelines?
Yes. OKFy is designed for automation and works well in CI/CD pipelines. Add pip install okfy && okfy convert ./docs --output ./okf-bundle to your GitHub Actions workflow to automatically generate and sync OKF bundles on every push. Combine with a validator like okf-lint for a complete automated pipeline. See the CI/CD use case above for a complete example.