Okf cli
Converts plain markdown into OKF-conformant knowledge bundles
npx -y skills add auto-medica-labs/okf-cli --skill okf-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
User manual and reference for the okf CLI tool (Open Knowledge Format). Use for questions about bundling plain markdown into OKF knowledge bases, validating OKF bundles, listing concepts, reading concepts, CLI options, and end-user workflows. Not for okf-cli source development.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.2 KB, as published. Nobody here has run it
okf CLI User Manual
okf converts plain markdown directories into Open Knowledge Format (OKF) bundles — structured knowledge bases with YAML frontmatter, auto-generated indexes, and cross-link support.
Installation
Requires Python 3.11+ and uv:
uv tool install okf-cli
okf --version
Upgrade:
uv tool upgrade okf-cli
CLI overview
okf [OPTIONS] COMMAND [ARGS]...
Global options:
| Option | Description |
|---|---|
--version | Show version and exit |
--install-completion | Install completion for the current shell |
--show-completion | Print completion script to copy |
--help | Show help |
Commands
okf bundle
Convert a directory of plain markdown into an OKF bundle.
okf bundle <input-dir> [output-dir] [OPTIONS]
Arguments:
| Argument | Description |
|---|---|
input-dir | Source directory of plain markdown files |
output-dir | Target directory (default: <input-dir>_knowledge_base) |
Options:
| Option | Description |
|---|---|
--default-type <type> | Concept type for root-level files (default: input directory name) |
--force, -f | Overwrite output directory if it exists |
--strict | Fail on broken local .md links and skip AGENTS.md generation |
Examples:
okf bundle my-docs --default-type reference
okf bundle my-docs out --default-type reference --force
okf bundle my-docs --default-type reference --strict
Behavior:
- Skips
index.md,log.md,README.mdduring input scanning. - Reads
.okfignorein the input root for exact bundle-relative paths to skip. - Generates
index.mdin every directory containing concepts or subdirectories. - Generates
AGENTS.mdat bundle root with navigation guidance (skipped with--strict). - Warns about broken local
.mdlinks;--strictturns warnings into fatal errors.
okf validate
Check whether a directory conforms to the OKF specification.
okf validate <directory>
Reports errors and warnings per file. Exits non-zero on conformance failures.
okf list
List all concept IDs in a conformant OKF bundle.
okf list <directory>
Concept IDs are bundle-relative paths without the .md suffix, e.g. tables/orders.
okf read
Print a concept's full contents by concept ID.
okf read <directory> <concept-id>
Example:
okf read my-docs_knowledge_base tables/orders
Plain markdown input format
Best-quality input uses strict shape:
# Clear Concept Title
> One-sentence summary of this concept.
Body content with useful context, structure, examples, or schema.
Lenient fallback exists for imperfect files, but metadata quality may be lower.
Rules:
- First line:
# Title - Next block:
>description (concise, factual) - Directory name becomes the concept
type:tables/orders.md→ typetables - Root-level files use
--default-type, or the input directory name if omitted - Do not add frontmatter to source files —
okf bundlegenerates it - Avoid creating
index.md,log.md, orREADME.mdas source concepts (reserved)
Typical workflow
# 1. Bundle
okf bundle my-notes --default-type reference --force
# 2. Validate
okf validate my-notes_knowledge_base
# 3. Explore
okf list my-notes_knowledge_base
okf read my-notes_knowledge_base some/concept
.okfignore
Place in the input root to exclude markdown files. Syntax:
# comments and blank lines allowed
private-notes.md
drafts/old-post.md
Entries are exact bundle-relative paths. No glob or negation support.
Reserved filenames
These files are never treated as concepts:
index.md— generated directory listingslog.md— changelog / activity logagents.md— agent navigation guidance (generated)README.md— skipped only during bundling input
Strict mode
Use --strict when you want:
- Broken local
.mdlinks to fail the bundle - No
AGENTS.mdgenerated
Example:
okf bundle my-docs --default-type reference --strict
Tips
- Always run
okf validatebefore consuming a bundle withlistorread; those commands refuse non-conformant bundles. - Use
--forcewhen regenerating bundles; output directories are not overwritten by default. - Root-level markdown files get their
typefrom the input directory name unless--default-typeis set. - Subdirectory markdown files get their
typefrom the subdirectory name.