Source Code
qmd โ Fast Local Markdown Search
When to Use
- Finding files โ use instead of
findacross large directories (avoids hangs) - Searching notes/docs โ semantic or keyword search in indexed collections
- Code discovery โ find implementations, configs, or patterns
- Context gathering โ pull relevant snippets before answering questions
Quick Reference
Search (most common)
# Keyword search (BM25)
qmd search "alpaca API" -c projects
# Semantic search (understands meaning)
qmd vsearch "how to implement stop loss"
# Combined search with reranking (best quality)
qmd query "trading rules for breakouts"
# File paths only (fast discovery)
qmd search "config" --files -c kell
# Full document content
qmd search "pattern detection" --full --line-numbers
Collections
# List collections
qmd collection list
# Add new collection
qmd collection add /path/to/folder --name myproject --mask "*.md,*.py"
# Re-index after changes
qmd update
Get Files
# Get full file
qmd get myproject/README.md
# Get specific lines
qmd get myproject/config.py:50 -l 30
# Get multiple files by glob
qmd multi-get "*.yaml" -l 50 --max-bytes 10240
Output Formats
--filesโ paths + scores (for file discovery)--jsonโ structured with snippets--mdโ markdown formatted-n 10โ limit results
Tips
- Always use collections (
-c name) to scope searches - Run
qmd updateafter adding new files - Use
qmd embedto enable vector search (one-time, takes a few minutes) - Prefer
qmd search --filesoverfindfor large directories
Models (auto-downloaded)
- Embedding: embeddinggemma-300M
- Reranking: qwen3-reranker-0.6b
- Generation: Qwen3-0.6B
All run locally โ no API keys needed.