Skip to content
GitHub

okf normalize-tags

usage: okf normalize-tags [-h] [--where EXPR] [--apply] [--json]
convert inline `tags: [...]` fields to YAML block-list form (local convention)
options:
-h, --help show this help message and exit
--where EXPR select concepts by an expression: `field op value` with op one of = != < <= > >= ~
(contains), or `field in (a, b)`; combine with and, or, not and parentheses.
Fields: type, tag, path (<bundle>/<concept-id>), archived (true or false), tier
(unverified, machine-confirmed or human-reviewed), stale (true or false), status
(an absent status is stable) and any frontmatter key (nested: a.b; through lists:
verified.by, sources.resource). Timestamp keys (generated.at, verified.at,
stale_after, usage_window.from/to, sources.last_modified,
sources.usage_window.from/to) compare as instants and take an ISO 8601 value with
an explicit offset: stale_after < 2026-10-01T00:00:00Z. Archived concepts are
hidden unless the expression names `archived`. Quote a value holding spaces, + or
other characters: 'a b'. Example: (type = Runbook and tag != draft) and path ~
home-lab/
--apply write changes (default: dry-run preview only)
--json print one JSON envelope {command, ok, data, warnings, error}