Usage
Subcommands
add
Add context for a path or collection.Path to add context for. Can be:
/for global context (applies to all collections)- Virtual path:
qmd://collection/orqmd://collection/subpath - Filesystem path (auto-detects collection)
- Omit to use current directory
Human-readable description of what the path contains
list
List all configured contexts.rm
Remove context from a path.Path to remove context from (virtual path or
/ for global)How Context Works
Context appears in search results and is used by:- Search results — Displayed alongside matching documents
- MCP tools — Included in document metadata for AI agents
- Multi-get — Shown when retrieving multiple files
- Path
/meetings/2025/jan.mdinherits context from/meetings/2025,/meetings, and collection root - Global context (
/) applies to all collections
Storage
Contexts are stored in~/.config/qmd/index.yml under the context key for each collection.
Related Commands
qmd collection
Manage collections
qmd query
Search with context
qmd status
Check context coverage
Collections guide
Learn about collections