ingest
Import local or cloned markdown into an OKF bundle, or adopt files in place by adding rule-based type, title, status, and git provenance frontmatter. Run without applying first to preview changes.
Instructions
Bring markdown from a local directory or git clone into an OKF bundle, or adopt it in place (bundle =
source; needs a clean git tree, so the diff is the review). Each file gets frontmatter: type from rules
({glob: type}, first match, else Document), title (its own, its H1, or the filename), status (default
draft: imported, not reviewed), optional stale_after, and provenance where git has it: sources (a
permalink and last_modified) and generated {by, at, basis: git-history}. Existing keys are kept. Never
overwrites; files that already have type are skipped, so a re-run is a no-op. A reserved index.md/log.md
carrying frontmatter is renamed -index.md/-log.md. apply=False is the plan: run it first, sample
files, set rules. keep_okf=true merges another OKF bundle: files that have type are copied as they are
(plus an origin source when git has one) and the source's index.md/log.md are left behind. It does not
clone, convert other formats, scan for secrets or check licenses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | ||
| limit | No | ||
| rules | No | ||
| bundle | No | ||
| offset | No | ||
| source | Yes | ||
| status | No | draft | |
| keep_okf | No | ||
| max_bytes | No | ||
| stale_days | No |