Skip to content

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/.

  • 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.

Terminal window
npx @hawkeyexl/manni term --help
  1. Write one page per term. type: term marks the page. label is the preferred name, and definition says what it means. The other fields are optional:

    docs/terms/corrective-lens.md
    ---
    type: term
    id: corrective-lens
    label: corrective lens
    narrower: [progressive lens]
    definition: A lens worn to correct a refractive error of the eye.
    ---
    docs/terms/progressive-lens.md
    ---
    type: term
    id: progressive-lens
    label: progressive lens
    alt-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 of
    the lens to the bottom, correcting presbyopia without the visible boundary a
    bifocal carries.
    ---

    alt-labels are other names a writer may use. hidden-labels are names nobody should. Every field is on the terminology reference.

  2. Declare the docset as a collection. The family config file names the documents once, for every tool:

    manni.config.yaml
    collections:
    - name: site
    paths:
    - "docs/**/*.md"

    No term: section is needed. The terms are the pages that say type: term, wherever they sit.

  3. List what the tool found.

    Terminal window
    manni term list
    corrective-lens corrective lens
    progressive-lens progressive lens PAL, graduated lens
    2 terms

concepts: on any page says which terms the page is about. Its values are labels:

docs/guides/fitting.md
---
title: Fitting lenses
concepts: [PAL, trifocal, corrective lens, progressive lens]
---
# Fitting lenses
  1. Run the check.

    Terminal window
    manni term check
    docs/guides/fitting.md:3
    warning 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-reference
    error 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-term
    1 error, 1 warning in 2 terms

    Each 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 claims trifocal. PAL is a name the set knows, but concepts: wants the label, so the warning says which entry claims it. A warning alone never fails the run.

  2. Fix the references. The guide already names progressive lens, so the alt-label is a duplicate. The set has no trifocal yet. Remove both:

    docs/guides/fitting.md
    ---
    title: Fitting lenses
    concepts: [progressive lens, corrective lens]
    ---
    # Fitting lenses
  3. Check again.

    ✓ 2 terms, 2 references, no findings

    The exit code is 0.

A termbase grows ahead of the pages. Add a third term, a child of corrective lens:

docs/terms/bifocal.md
---
type: term
id: bifocal
label: bifocal
broader: [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-term
docs/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 terms

Neither 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 terms

The 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:.

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:

docs/guides/trifocals.md
---
title: Fitting trifocals
concepts: [progressive lens, trifocal]
graph:
label: trifocal
broader: [corrective lens]
---
# Fitting trifocals

The 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.

  1. See what is missing. --offline sends nothing off this machine, and --dry-run writes 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-run
    manni: 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 definition
    1 term would be created, 0 would be filled, 1 left without a definition

    The page goes beside the term pages you already have, in their format.

  2. Write the pages. With a model provider configured, drop --offline, and a model drafts each definition. A draft is written only when its confidence clears term.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: trifocal
    type: term
    id: trifocal
    label: trifocal
    broader:
    - corrective lens
    ---
  3. 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.