QMD Search Setup
qmd is the local search layer for the wiki brain: use it before web search, then refresh it after wiki edits.
Use this page when entering a repo, answering from the wiki, or closing a broad rewrite. The canonical tool page is QMD - Local Wiki Search Engine; this quickref keeps the agent-doc closeout path short.
Install
npm install -g @tobilu/qmd
qmd update
qmd embed
Expose MCP to Cursor through .cursor/mcp.json when that harness needs direct qmd tools. Codex can use local shell commands unless a qmd MCP is already configured.
Query Pattern
| Command | Use |
|---|---|
qmd search "term" |
Fast lexical search for names, slugs, and exact phrases. |
qmd vsearch "concept" |
Semantic search when the wording may differ. |
qmd query "question" |
Hybrid answer retrieval with reranking. |
qmd get "path/to/file.md" |
Direct page read through qmd. |
Brain-first lookup means: search qmd or _index.md, read 3-8 relevant pages, follow key backlinks/wikilinks, then use external sources only to fill gaps or verify volatile facts.
Refresh Rule
After page edits, run:
npm run build-index
qmd update
qmd embed
build-index refreshes wiki links and catalog metadata. qmd update refreshes document discovery. qmd embed refreshes semantic vectors. Skipping the last step leaves new synthesis invisible to semantic search, which is where the next agent will trip over its shoelaces.
Closeout
For source/pack changes, run the generated-surface commands before the final qmd refresh so generated outputs are indexed too.
Timeline
- 2026-07-01 | Reframed qmd setup as the brain-first lookup and closeout contract, including the build-index/update/embed order. Source: User request, 2026-07-01
- 2026-05-31 | Agent doc setup guide from qmd-wiki-search tool page. Source: QMD - Local Wiki Search Engine, 2026-05-31