The Problem

You’ve got docs everywhere—notes in Markdown, meeting transcripts in some random folder, work docs scattered across a dozen directories. Searching through all that is a nightmare. Basic keyword search misses context, semantic search tools require cloud services (goodbye privacy), and integrating everything with your AI workflows? Forget it. Nobody has time for that.

What This Does

qmd is your local search engine with brains. It combines classic BM25 full-text search, vector-based semantic search, and LLM re-ranking—all running locally. No cloud, no data leaks, no monthly subscription nonsense. The core logic lives in src/, with entry points like src/index.ts for the CLI and src/mcp/server.ts for the server-side stuff. You can create "collections" (namespaced directories for notes, docs, etc.) using qmd collection add, and then layer context on top via qmd context add—this is where the magic happens. Context lets LLMs make smarter decisions by understanding the relationships between your files. Oh, and the finetune/ folder? That’s where the heavy lifting for embeddings and scoring happens, using GGUF models.

It’s scriptable too. Want to search for all files mentioning “API” and pass them to your AI agent? qmd outputs structured results (--json) or actual files (--files). And if you’re into server setups, the MCP server in src/mcp/server.ts lets you integrate qmd with tools like Claude or any other agent that can handle HTTP or stdio.

Real-World Use

Let’s say you’re prepping for a quarterly review. Your notes are in ~/notes, meeting transcripts in ~/Documents/meetings, and work docs in ~/work/docs. First, you set up collections:

Then, add context for each:

Now, you can search everything with qmd query "quarterly review", and even get the top 10 results in JSON format with --json. Need your AI assistant to summarize these documents? Pass the --files output to your agent. Boom, you're done.

The Bottom Line

qmd is like Spotlight or Windows Search on steroids, but private, smarter, and actually useful for people who work with tons of text. The local-first philosophy is a massive win, and the integration points (MCP, JSON, etc.) make it a dream for AI workflows. Downsides? Setting up embeddings and fine-tuning might be overkill for smaller projects, and the CLI could feel overwhelming if you're not comfy with terminal tools. But if you’re tired of half-baked search tools, this is worth it.