QMD - Quick Markdown Search
Local search engine for Markdown notes, docs, and knowledge bases. Index once, search fast.
When to use
Use this skill when the user wants to:
- •search notes, docs, or a knowledge base
- •find related markdown content
- •retrieve documents from indexed collections
- •search local markdown files for specific topics or keywords
Inputs required
- •Collection name or path to markdown files
- •Search query (keywords or semantic intent)
- •Preferred search mode (keyword vs semantic vs hybrid)
Procedure
0) Verify installation
Check if qmd is installed:
bash
which qmd || echo "qmd not installed"
If not installed:
bash
# Install Bun first (macOS) brew install oven-sh/bun/bun # macOS also needs SQLite brew install sqlite # Install qmd globally bun install -g https://github.com/tobi/qmd
1) Set up a collection (first time only)
bash
# Add a collection with path and file mask qmd collection add /path/to/notes --name notes --mask "**/*.md" # Optional: add context description qmd context add qmd://notes "Personal notes and documentation" # Enable semantic search (one-time, can be slow) qmd embed
2) Choose the right search mode
Default to qmd search (BM25 keyword matching)
- •Instant results
- •Best for exact terms, filenames, specific phrases
Use qmd vsearch only when keyword search fails
- •Semantic similarity via vectors
- •Can take ~60 seconds on cold start (loads local LLM model)
- •Better for conceptual queries
Avoid qmd query unless explicitly requested
- •Hybrid search with LLM reranking
- •Slowest option, may timeout
- •Only when highest quality results are worth the wait
3) Execute the search
bash
# Default keyword search (fastest) qmd search "your query" # Search specific collection qmd search "query" -c notes # More results qmd search "query" -n 10 # JSON output for parsing qmd search "query" --json # All matches above threshold qmd search "query" --all --min-score 0.3 # Semantic search (last resort) qmd vsearch "query"
4) Retrieve full documents
bash
# By file path qmd get "path/to/file.md" # By document ID from search results qmd get "#docid" # Multiple documents qmd multi-get "journals/2025-05*.md" qmd multi-get "doc1.md, doc2.md, #abc123" --json
Verification
- •
qmd statusshows index health and collection info - •Search returns relevant results with scores
- •Document retrieval works for indexed files
Maintenance
Keep indexes fresh:
bash
# Re-index changed files (fast) qmd update # Update embeddings (slower, for semantic search) qmd embed
Optional cron automation:
bash
# Hourly keyword index update 0 * * * * export PATH="$HOME/.bun/bin:$PATH" && qmd update # Nightly embedding refresh 0 5 * * * export PATH="$HOME/.bun/bin:$PATH" && qmd embed
Failure modes / debugging
- •
Search returns nothing:
- •Check collection exists:
qmd status - •Verify files match the mask pattern
- •Run
qmd updateto refresh index
- •Check collection exists:
- •
Semantic search is very slow:
- •Normal on cold start (~60s) - model loading
- •Consider keeping process warm for repeated searches
- •Default to keyword search when possible
- •
vsearch/query times out:
- •Local LLM model loading can be slow
- •Fall back to
qmd searchfor immediate results
- •
Collection not found:
- •List collections:
qmd collection list - •Re-add if missing:
qmd collection add /path --name name --mask "**/*.md"
- •List collections:
Escalation
- •For detailed usage, see: https://github.com/tobi/qmd
- •Use
qmd --helporqmd <command> --helpfor command-specific options
Important distinction
- •
qmdsearches local files (notes/docs on disk that you index) - •Agent memory search searches agent memory (saved facts from prior interactions)
- •Use both: memory for "what did we discuss?", qmd for "what's in my notes?"