qmd
- title
- qmd
- type
- toolbox
- summary
- Local-first search over markdown notes combining BM25, vector search and LLM re-ranking
- tags
- typescript, search, markdown, llm, mcp, knowledge-management
- language
- TypeScript
- license
- MIT
- created
- 2026-04-06
- updated
- 2026-04-06
A local-first search engine for markdown notes, docs, and knowledge bases. Combines BM25 keyword search, vector semantic search, and LLM re-ranking β all running locally via node-llama-cpp with GGUF models. No API keys, no cloud. By Tobi LΓΌtke (Shopify CEO).
Three search modes:
qmd search "query"β BM25 keyword search (fast, no model needed)qmd vsearch "query"β vector semantic search via local embeddingsqmd query "query"β hybrid: both BM25 + vector, then LLM re-ranks results (best quality)
Basic setup:
npm install -g @tobilu/qmd
qmd collection add ~/notes --name notes
qmd collection add ~/Documents/meetings --name meetings
qmd embed # generate embeddings
qmd query "quarterly planning"
Integration options:
- CLI for direct use
- MCP server β works with Claude Desktop and Claude Code out of the box
- Node.js/Bun SDK for embedding in other tools
- HTTP transport for shared server instances (
qmd mcp --http --daemon)
Architecture: three-tier pipeline. Lexical (BM25) and vector searches run in parallel, then an LLM re-ranker scores the combined results. Supports natural language query expansion β the LLM rewrites your query into better keyword and semantic variants before searching. Collections can have descriptive context to improve relevance.
SDK highlights: createStore() gives you programmatic access to search, embedding, collection management, and document retrieval. Supports glob patterns, line ranges, batch retrieval, and progress callbacks.
Relevance to this wiki: qmd could index the wiki/ and sources/ directories, providing semantic search over the knowledge base. Right now the query workflow reads index.md and follows links manually. qmd would let you find relevant pages even when the wikilink graph doesn't connect them, especially as the wiki grows. The MCP integration means Claude Code could use it directly.
Repo: https://github.com/tobi/qmd β 18.2k stars, MIT license.