tobi /
qmd
Local command-line search for your notes, docs and transcripts, with AI re-ranking
- 30.6k stars
- 421 stars since 3 Oct
- TypeScript
- Updated 8 days ago
- Some experience
- Memory, RAG & data
QMD is a search engine for the files you want to remember: markdown notes, meeting transcripts, documentation and knowledge bases. You point it at folders, which it calls collections, and it builds an index on your machine. The language models run locally through node-llama-cpp using GGUF model files.
A full query works in stages. The query is expanded into a few variants. Keyword matches (BM25) and meaning-based matches (vector search) are found separately. The two result lists are merged with reciprocal rank fusion, and a language model re-ranks the merged list. You can also run only the keyword search or only the vector search when you want speed.
It is built with agents in mind. Output can be JSON or a plain file list, and it runs as an MCP server over stdio or HTTP. You can attach short descriptions to collections and paths. These come back with matching results, so a model can judge which documents to open. It can also be used as a Node or Bun library.
What it does
Three search modes
Run qmd search for keywords, qmd vsearch for meaning, or qmd query for the hybrid with re-ranking, which the README calls the best quality.
Runs on your own machine
Models run through node-llama-cpp and GGUF files, so the index and queries stay local.
Context attached to results
Add a short description to a collection or path. It is returned with matching documents, which helps an LLM choose between results.
MCP server and agent output
Exposes query, get, multi_get, status and metadata tools over stdio or HTTP. There is a Claude Code plugin, and --json and --files output for scripts.
Node and Bun library
createStore() lets you index folders and call search, get and multiGet from your own code, with optional metadata filters.
What you could build
- Search years of markdown notes by meaning instead of exact words.
- Give a coding agent a searchable index of your project docs through MCP.
- Find past decisions across meeting transcripts with a hybrid query.
- Export every file that matches a topic above a score threshold for an LLM to read.
- Embed local document search in a Node or Bun app using the SDK.
Get started
Install it with npm or Bun, add a folder as a collection, then run qmd embed to build embeddings. After that, try qmd search, qmd vsearch or qmd query.
npm install -g @tobilu/qmdqmd collection add ~/notes --name notesqmd embedCommands are copied from the project's README. Read it on GitHub for the full setup.
More in Memory, RAG & data
vectorize-io/hindsight
Memory server that lets AI agents store, search and learn from past interactions