Search markdown knowledge bases efficiently using qmd. Use this when searching Obsidian vaults or markdown collections to find relevant content with minimal token usage.
Search markdown knowledge bases efficiently using qmd, a local indexing tool that uses BM25 + vector embeddings to return only relevant snippets instead of full files.
qmd search "your query" --collection <name>
Fast, accurate keyword-based search. Best for specific terms or phrases.
qmd vsearch "your query" --collection <name>
Semantic similarity search. Best for conceptual queries where exact words may vary.
qmd hybrid "your query" --collection <name>
Combines both approaches with LLM reranking. Most thorough but often overkill.
Check if collection exists:
qmd collection list
Search the collection:
# For specific terms
qmd search "api authentication" --collection notes
# For conceptual queries
qmd vsearch "how to handle errors gracefully" --collection notes
Read results: qmd returns relevant snippets with file paths and context
# Install qmd
bun install -g https://github.com/tobi/qmd
# Add a collection (e.g., Obsidian vault)
qmd collection add ~/path/to/vault --name notes
# Generate embeddings for vector search
qmd embed --collection notes
/qmd api authentication # BM25 search for "api authentication"
/qmd how to handle errors --semantic # Vector search for conceptual query
/qmd --setup # Guide through initial setup
qmd search) for specific terms, names, or technical keywordsqmd vsearch) when looking for concepts where wording may varyqmd embed after adding significant new content to keep vectors current$ARGUMENTS contains the full search query--semantic flag is present, use qmd vsearch instead of qmd search--setup flag is present, guide user through installation and collection setup--collection <name> is specified, use that collection; otherwise default to checking available collections$ARGUMENTSwhich qmd)