QMD: Search Markdown Notes Locally
QMD (Query Markup Documents) is an on-device search engine for Markdown notes, meeting transcripts, documentation, and knowledge bases. It is useful when you remember a subject but not the filename or the words used in the note. A research library is one possible use; QMD does not require a particular folder layout or note taxonomy.
Choose the search mode
QMD offers three ways to find documents:
searchuses BM25, a full-text ranking method based on query terms. Use it for known terminology such as “FIFO execution”; it does not need a language model.vsearchcompares embeddings, numerical representations used to estimate similarity in meaning. Use it when your wording may differ from the source.querycombines keyword and vector retrieval with query expansion and model-based reranking. Expansion supplies alternative search formulations; reranking reorders the retrieved candidates.
These models run locally. Model files are downloaded on first use, so initial setup can need a network connection. Semantic search also needs document embeddings. Runtime and relevance depend on the corpus, models, hardware, and query; a high score is not a factual endorsement.
Set up a collection and find a note
With QMD installed from the official npm package, replace ./notes with an existing Markdown directory. Here notes is a collection name you choose, not a built-in library.
qmd collection add ./notes --name notes
qmd embed
qmd query "quantitative research production isolation" -c notes
qmd search "FIFO execution" -c notes
Keyword search can be used without the embedding step. For a semantic-only comparison, try:
qmd vsearch "how to keep research separate from production" -c notes
Open a path or document ID returned by the search. The path below is illustrative; it must exist in your collection:
qmd get qmd://notes/quant/portfolio-lifecycle.md
get includes line numbers by default. Read the surrounding explanation and its citations, not just the matching excerpt. After editing source notes, refresh the index and generate missing embeddings:
qmd update
qmd embed
For a collection you configured yourself, these refresh your searchable copy. Review any collection update commands before using someone else's setup: QMD can run configured shell commands during update.
Use the result as evidence
A query about research and production isolation might locate an earlier architecture note. Check its date, assumptions, and cited sources before reusing the design. QMD retrieves what was indexed; it does not establish that the note is current or correct, and an empty result does not prove that no relevant document exists.
QMD also exposes search and document retrieval through MCP, a protocol for connecting AI clients to tools. This makes retrieval available to an assistant, but it does not make the retrieved text an instruction or authorize actions mentioned in it.
Related tools
Basic Memory supports reading and writing linked Markdown notes across sessions. QMD is useful when the immediate need is to search an existing document collection. zvec-grep searches a workspace's code and documents with source locations. Their capabilities overlap; you need not deploy all three. Agent Memory and Retrieval explains how to choose relevant context without treating memory as authority.