Get started
concepts: takes any string, so a misspelled or retired term passes schema
validation and points at nothing.
This page takes a docset from a concepts: field that can say anything to one
whose every value names a defined term. You’ll write two term pages, list
them, and reference them from a guide. Then you’ll run the check, read the
finding, and fix it.
Every transcript below is real output from the built tool, run over the
fixtures in test/fixtures/term/cli/.
Before you start
Section titled “Before you start”- Node.js 24 or newer. Check with
node --version. - A docset with frontmatter. The pages here are Markdown. A term page works the same way in every format manni meta reads.
manni term ships in the same package as manni meta.
npx @hawkeyexl/manni term --helpnpm install -g @hawkeyexl/mannimanni term --helpWrite the terms
Section titled “Write the terms”-
Write one page per term.
type: termmarks the page.labelis the preferred name, anddefinitionsays what it means. The other fields are optional:docs/terms/corrective-lens.md ---type: termid: corrective-lenslabel: corrective lensnarrower: [progressive lens]definition: A lens worn to correct a refractive error of the eye.---docs/terms/progressive-lens.md ---type: termid: progressive-lenslabel: progressive lensalt-labels: [PAL, graduated lens]hidden-labels: [no-line bifocal]broader: [corrective lens]abstract: Lenses that correct presbyopia without a visible line.definition: >-Corrective lenses whose optical power increases continuously from the top ofthe lens to the bottom, correcting presbyopia without the visible boundary abifocal carries.---alt-labelsare other names a writer may use.hidden-labelsare names nobody should. Every field is on the terminology reference. -
Declare the docset as a collection. The family config file names the documents once, for every tool:
manni.config.yaml collections:- name: sitepaths:- "docs/**/*.md"No
term:section is needed. The terms are the pages that saytype: term, wherever they sit. -
List what the tool found.
Terminal window manni term listcorrective-lens corrective lensprogressive-lens progressive lens PAL, graduated lens2 terms
Reference a term from a guide
Section titled “Reference a term from a guide”concepts: on any page says which terms the page is about. Its values are
labels:
---title: Fitting lensesconcepts: [PAL, trifocal, corrective lens, progressive lens]---# Fitting lenses-
Run the check.
Terminal window manni term checkdocs/guides/fitting.md:3warning manni:term/alt-label-reference concepts: "PAL" is an alt-label of "progressive lens", so name the label.manni:term alt-label-reference: A page's concepts: names an entry by one of its alt-labels.Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#alt-label-referenceerror manni:term/undefined-term concepts: "trifocal" names no entry.Correct the value, or run manni term fill to add the term.manni:term undefined-term: A page's concepts: names no entry, by label, id or alt-label.Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#undefined-term1 error, 1 warning in 2 termsEach finding ends with what to do. Under it, a dim line names the rule and says what it means, and a
Guide:line links its section of the rules reference.The exit code is
1, from the error. No entry claimstrifocal.PALis a name the set knows, butconcepts:wants the label, so the warning says which entry claims it. A warning alone never fails the run. -
Fix the references. The guide already names
progressive lens, so the alt-label is a duplicate. The set has notrifocalyet. Remove both:docs/guides/fitting.md ---title: Fitting lensesconcepts: [progressive lens, corrective lens]---# Fitting lenses -
Check again.
✓ 2 terms, 2 references, no findingsThe exit code is
0.
Add a term nothing uses yet
Section titled “Add a term nothing uses yet”A termbase grows ahead of the pages. Add a third term, a child of
corrective lens:
---type: termid: bifocallabel: bifocalbroader: [corrective lens]definition: Lenses with two distinct optical powers, divided by a visible line.---docs/terms/bifocal.md:1 notice manni:term/unused-term no page's concepts: names this term. Name it in the concepts: of a page that uses it. manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-termdocs/terms/corrective-lens.md:5 warning manni:term/asymmetric-hierarchy narrower: omits "bifocal", which lists this entry as broader. Add it to narrower, or remove this entry from its broader. manni:term asymmetric-hierarchy: A names B as broader, and B omits A from narrower, or the reverse. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#asymmetric-hierarchy
1 warning, 1 notice in 3 termsNeither finding fails the run, and the exit code is 0. The warning names the
line to change. Add bifocal to the narrower list of corrective lens, and
the warning goes:
docs/terms/bifocal.md:1 notice manni:term/unused-term no page's concepts: names this term. Name it in the concepts: of a page that uses it. manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-term
1 notice in 3 termsThe notice stays until a page names bifocal in its concepts:. A set written
ahead of its pages can turn it off with severity: {unused-term: off} under
term:.
Start from the concepts your pages name
Section titled “Start from the concepts your pages name”A docset often names its concepts before it has a termbase. manni term fill
writes a term page for each name no entry claims. A name counts when a page
mentions it in concepts: or in a graph: block’s edges. Here a guide about
trifocals names trifocal, and its graph: block puts it under
corrective lens:
---title: Fitting trifocalsconcepts: [progressive lens, trifocal]graph: label: trifocal broader: [corrective lens]---# Fitting trifocalsThe block’s label alone would not count. It is the guide naming its own
topic, so it only adds to a page another mention asks for.
-
See what is missing.
--offlinesends nothing off this machine, and--dry-runwrites nothing. This is a machine with no local model downloaded, so the run says why the page has no definition:Terminal window manni term fill --offline --dry-runmanni: no model is available offline, so new terms have no definition; download one first with --local, or drop --offline.would create docs/terms/trifocal.md trifocal stub, no definition1 term would be created, 0 would be filled, 1 left without a definitionThe page goes beside the term pages you already have, in their format.
-
Write the pages. With a model provider configured, drop
--offline, and a model drafts each definition. A draft is written only when its confidence clearsterm.fill.confidenceThreshold, and the page records which model wrote it. Without one, each page is a stub that carries what the guide says:docs/terms/trifocal.md ---title: trifocaltype: termid: trifocallabel: trifocalbroader:- corrective lens--- -
Write the definitions a stub lacks, then run
manni term check.
--crawl goes further. It sends each page’s body to the model, which proposes
terms no metadata names yet. The CLI
reference has every flag, and the
configuration reference
has the keys.
From tags to a knowledge graph takes these steps on to a governed termbase and a checked graph.