qmd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

QMD - Quick Markdown Search

QMD - 快速Markdown搜索

QMD is a local, on-device search engine for markdown content. It indexes your notes, meeting transcripts, documentation, and knowledge bases for fast retrieval.
QMD是一款本地设备端的Markdown内容搜索引擎。它会为你的笔记、会议记录、文档和知识库建立索引,以便快速检索。

QMD Status

QMD状态

!
qmd status 2>/dev/null || echo "Not installed. Run: bun install -g https://github.com/tobi/qmd"
!
qmd status 2>/dev/null || echo "Not installed. Run: bun install -g https://github.com/tobi/qmd"

When to Use This Skill

何时使用该工具

  • User asks to search their notes, documents, or knowledge base
  • User needs to find information in their markdown files
  • User wants to retrieve specific documents or search across collections
  • User asks "what did I write about X" or "find my notes on Y"
  • User needs semantic search (conceptual similarity) not just keyword matching
  • User mentions meeting notes, transcripts, or documentation lookup
  • 用户要求搜索自己的笔记、文档或知识库
  • 用户需要在Markdown文件中查找信息
  • 用户想要检索特定文档或跨集合搜索
  • 用户询问“我关于X写了什么”或“查找我关于Y的笔记”
  • 用户需要语义搜索(概念相似度匹配)而非单纯的关键词匹配
  • 用户提及会议记录、转录文档或文档查询

Search Commands

搜索命令

Choose the right search mode for the task:
CommandUse WhenSpeed
qmd search
Exact keyword matches neededFast
qmd vsearch
Keywords aren't working, need conceptual matchesMedium
qmd query
Best results needed, speed not criticalSlower
bash
undefined
根据任务选择合适的搜索模式:
命令使用场景速度
qmd search
需要精确关键词匹配时快速
qmd vsearch
关键词搜索无效,需要概念匹配时中等
qmd query
需要最佳结果,对速度要求不高时较慢
bash
undefined

Fast keyword search (BM25)

快速关键词搜索(BM25算法)

qmd search "your query"
qmd search "your query"

Semantic vector search (finds conceptually similar content)

语义向量搜索(查找概念相似的内容)

qmd vsearch "your query"
qmd vsearch "your query"

Hybrid search with re-ranking (best quality)

带重排序的混合搜索(最佳质量)

qmd query "your query"
undefined
qmd query "your query"
undefined

Common Options

常用选项

bash
-n <num>                 # Number of results (default: 5)
-c, --collection <name>  # Restrict to specific collection
--all                    # Return all matches
--min-score <num>        # Minimum score threshold (0.0-1.0)
--full                   # Show full document content
--json                   # JSON output for processing
--files                  # List files with scores
--line-numbers           # Add line numbers to output
bash
-n <num>                 # 结果数量(默认:5)
-c, --collection <name>  # 限制到特定集合
--all                    # 返回所有匹配结果
--min-score <num>        # 最低分数阈值(0.0-1.0)
--full                   # 显示完整文档内容
--json                   # 输出JSON格式以便处理
--files                  # 列出带分数的文件
--line-numbers           # 在输出中添加行号

Document Retrieval

文档检索

bash
undefined
bash
undefined

Get document by path

通过路径获取文档

qmd get "collection/path/to/doc.md"
qmd get "collection/path/to/doc.md"

Get document by docid (shown in search results as #abc123)

通过docid获取文档(搜索结果中显示为#abc123)

qmd get "#abc123"
qmd get "#abc123"

Get with line numbers for code review

获取带行号的文档用于代码审查

qmd get "docs/api.md" --line-numbers
qmd get "docs/api.md" --line-numbers

Get multiple documents by glob pattern

通过通配符模式获取多个文档

qmd multi-get "docs/*.md"
qmd multi-get "docs/*.md"

Get multiple documents by list

通过列表获取多个文档

qmd multi-get "doc1.md, doc2.md, #abc123"
undefined
qmd multi-get "doc1.md, doc2.md, #abc123"
undefined

Index Management

索引管理

bash
undefined
bash
undefined

Check index status and available collections

检查索引状态和可用集合

qmd status
qmd status

List all collections

列出所有集合

qmd collection list
qmd collection list

List files in a collection

列出集合中的文件

qmd ls <collection-name>
qmd ls <collection-name>

Update index (re-scan files for changes)

更新索引(重新扫描文件以检测变更)

qmd update
undefined
qmd update
undefined

Score Interpretation

分数解读

ScoreMeaningAction
0.8 - 1.0Highly relevantShow to user
0.5 - 0.8Moderately relevantInclude if few results
0.2 - 0.5Somewhat relevantOnly if user wants more
0.0 - 0.2Low relevanceUsually skip
分数含义操作
0.8 - 1.0高度相关展示给用户
0.5 - 0.8中等相关若结果较少则包含
0.2 - 0.5一定相关性仅当用户需要更多结果时展示
0.0 - 0.2相关性低通常跳过

Recommended Workflow

推荐工作流程

  1. Check what's available:
    qmd status
  2. Start with keyword search:
    qmd search "topic" -n 10
  3. Try semantic if needed:
    qmd vsearch "describe the concept"
  4. Use hybrid for best results:
    qmd query "question" --min-score 0.4
  5. Retrieve full documents:
    qmd get "#docid" --full
  1. 检查可用内容
    qmd status
  2. 从关键词搜索开始
    qmd search "topic" -n 10
  3. 必要时尝试语义搜索
    qmd vsearch "describe the concept"
  4. 使用混合搜索获取最佳结果
    qmd query "question" --min-score 0.4
  5. 检索完整文档
    qmd get "#docid" --full

Example: Finding Meeting Notes

示例:查找会议记录

bash
undefined
bash
undefined

Search for meetings about a topic

搜索关于某个主题的会议

qmd search "quarterly review" -c meetings -n 5
qmd search "quarterly review" -c meetings -n 5

Get semantic matches

获取语义匹配结果

qmd vsearch "performance discussion" -c meetings
qmd vsearch "performance discussion" -c meetings

Retrieve the full meeting notes

检索完整的会议记录

qmd get "#abc123" --full
undefined
qmd get "#abc123" --full
undefined

Example: Research Across All Notes

示例:跨所有笔记进行研究

bash
undefined
bash
undefined

Hybrid search for best results

使用混合搜索获取最佳结果

qmd query "authentication implementation" --min-score 0.3 --json
qmd query "authentication implementation" --min-score 0.3 --json

Get all relevant files for deeper analysis

获取所有相关文件以进行深入分析

qmd query "auth flow" --all --files --min-score 0.4
undefined
qmd query "auth flow" --all --files --min-score 0.4
undefined

MCP Server Integration

MCP Server集成

This plugin configures the qmd MCP server automatically. When available, prefer MCP tools over Bash for tighter integration:
MCP ToolEquivalent CLIPurpose
qmd_search
qmd search
Fast BM25 keyword search
qmd_vsearch
qmd vsearch
Semantic vector search
qmd_query
qmd query
Hybrid search with reranking
qmd_get
qmd get
Retrieve document by path or docid
qmd_multi_get
qmd multi-get
Retrieve multiple documents
qmd_status
qmd status
Index health and collection info
For manual MCP setup without the plugin, see references/mcp-setup.md.
该插件会自动配置qmd MCP服务器。当可用时,优先使用MCP工具而非Bash以实现更紧密的集成:
MCP工具等效CLI命令用途
qmd_search
qmd search
快速BM25关键词搜索
qmd_vsearch
qmd vsearch
语义向量搜索
qmd_query
qmd query
带重排序的混合搜索
qmd_get
qmd get
通过路径或docid检索文档
qmd_multi_get
qmd multi-get
检索多个文档
qmd_status
qmd status
索引健康状况和集合信息
如需不通过插件手动设置MCP,请参阅references/mcp-setup.md