← 返回列表
全部 Skill›数据与AI Data & AI›qmd

qmd

作者 @NousResearch · 语言 en
Hybrid local search over notes, docs, and transcripts.
数据与AI Data & AILLM 与 AI通用执行命令访问网络读写文件待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
265,921
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

QMD — Query Markup Documents

Local, on-device search engine for personal knowledge bases. Indexes markdown

notes, meeting transcripts, documentation, and any text-based files, then

provides hybrid search combining keyword matching, semantic understanding, and

LLM-powered reranking — all running locally with no cloud dependencies.

Created by Tobi Lütke. MIT licensed.

When to Use

  • User asks to search their notes, docs, knowledge base, or meeting transcripts
  • User wants to find something across a large collection of markdown/text files
  • User wants semantic search ("find notes about X concept") not just keyword grep
  • User has already set up qmd collections and wants to query them
  • User asks to set up a local knowledge base or document search system
  • Keywords: "search my notes", "find in my docs", "knowledge base", "qmd"

Prerequisites

Node.js >= 22 (required)

# Check version
node --version  # must be >= 22

# macOS — install or upgrade via Homebrew
brew install node@22

# Linux — use NodeSource or nvm
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# or with nvm:
nvm install 22 && nvm use 22

SQLite with Extension Support (macOS only)

macOS system SQLite lacks extension loading. Install via Homebrew:

brew install sqlite

Install qmd

npm install -g @tobilu/qmd
# or with Bun:
bun install -g @tobilu/qmd

First run auto-downloads 3 local GGUF models (~2GB total):

| Model | Purpose | Size |

|-------|---------|------|

| embeddinggemma-300M-Q8_0 | Vector embeddings | ~300MB |

| qwen3-reranker-0.6b-q8_0 | Result reranking | ~640MB |

| qmd-query-expansion-1.7B | Query expansion | ~1.1GB |

Verify Installation

qmd --version
qmd status

Quick Reference

| Command | What It Does | Speed |

|---------|-------------|-------|

| qmd search "query" | BM25 keyword search (no models) | ~0.2s |

| qmd vsearch "query" | Semantic vector search (1 model) | ~3s |

| qmd query "query" | Hybrid + reranking (all 3 models) | ~2-3s warm, ~19s cold |

| qmd get <docid> | Retrieve full document content | instant |

| qmd multi-get "glob" | Retrieve multiple files | instant |

| qmd collection add <path> --name <n> | Add a directory as a collection | instant |

| qmd context add <path> "description" | Add context metadata to improve retrieval | instant |

| qmd embed | Generate/update vector embeddings | varies |

| qmd status | Show index health and collection info | instant |

| qmd mcp | Start MCP server (stdio) | persistent |

| qmd mcp --http --daemon | Start MCP server (HTTP, warm models) | persistent |

Setup Workflow

1. Add Collections

Point qmd at directories containing your documents:

# Add a notes directory
qmd collection add ~/notes --name notes

# Add project docs
qmd collection add ~/projects/myproject/docs --name project-docs

# Add meeting transcripts
qmd collection add ~/meetings --name meetings

# List all collections
qmd collection list

2. Add Context Descriptions

Context metadata helps the search engine understand what each collection

contains. This significantly improves retrieval quality:

qmd context add qmd://notes "Personal notes, ideas, and journal entries"
qmd context add qmd://project-docs "Technical documentation for the main project"
qmd context add qmd://meetings "Meeting transcripts and action items from team syncs"

3. Generate Embeddings

qmd embed

This processes all documents in all collections and generates vector

embeddings. Re-run after adding new documents or collections.

4. Verify

qmd status   # shows index health, collection stats, model info

Search Patterns

Fast Keyword Search (BM25)

Best for: exact terms, code identifiers, names, known phrases.

No models loaded — near-instant results.

qmd search "authentication middleware"
qmd search "handleError async"

Semantic Vector Search

Best for: natural language questions, conceptual queries.

Loads embedding model (~3s first query).

qmd vsearch "how does the rate limiter handle burst traffic"
qmd vsearch "ideas for improving onboarding flow"

Hybrid Search with Reranking (Best Quality)

Best for: important queries where quality matters most.

Uses all 3 models — query expansion, parallel BM25+vector, reranking.

qmd query "what decisions were made about the database migration"

Structured Multi-Mode Queries

Combine different search types in a single query for precision:

# BM25 for exact term + vector for concept
qmd query $'lex: rate limiter\nvec: how does throttling work under load'

# With query expansion
qmd query $'expand: database migration plan\nlex: "schema change"'

Query Syntax (lex/BM25 mode)

| Syntax | Effect | Example |

|--------|--------|---------|

| term | Prefix match | perf matches "performance" |

| "phrase" | Exact phrase | "rate limiter" |

| -term | Exclude term | performance -sports |

HyDE (Hypothetical Document Embeddings)

For complex topics, write what you expect the answer to look like:

qmd query $'hyde: The migration plan involves three phases. First, we add the new columns without dropping the old ones. Then we backfill data. Finally we cut over and remove legacy columns.'

Scoping to Collections

qmd search "query" --collection notes
qmd query "query" --collection project-docs

Output Formats

qmd search "query" --json        # JSON output (best for parsing)
qmd search "query" --limit 5     # Limit results
qmd get "#abc123"   
评论
NNousResearch
NousResearch
NousResearch/hermes-agent
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@NousResearch
所属大类数据与AI Data & AI / LLM 与 AI
国内可用性通用
最近源活动—
风险提示执行命令、访问网络、读写文件
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。