Adding Collections
Create a collection to index markdown files in a directory:The default glob pattern is
**/*.md, which indexes all markdown files recursively while excluding common directories like node_modules, .git, .cache, vendor, dist, and build.Collection Naming
If you don’t specify--name, QMD uses the directory basename:
a-zA-Z0-9_-).
Listing Collections
View all indexed collections:The
[excluded] tag means this collection is not searched by default unless explicitly specified with -c or --collection.Removing Collections
Remove a collection and all its indexed documents:Renaming Collections
Change a collection’s name:Listing Files in a Collection
Browse files in a collection:Include/Exclude Filtering
Control which collections are searched by default:Excluding a Collection
Mark a collection as excluded from default searches:Including a Collection
Re-enable a previously excluded collection:Collections are included by default when created. Use exclusion for archives, deprecated content, or collections you only want to search explicitly.
Update Commands
Automate collection updates with custom bash commands. Useful for git repos or synced directories.Setting an Update Command
Removing an Update Command
Running Updates
Update all collections (runs custom commands if configured):Collection Configuration Storage
Collections are stored in~/.config/qmd/index.yml:
Manually editing
index.yml is supported but use the CLI commands when possible to avoid syntax errors.Virtual Paths
Each collection has a virtual path namespace:- Collection root:
qmd://notes/ - Files within:
qmd://notes/path/to/file.md
Best Practices
Organize by domain
Create separate collections for different knowledge domains (personal notes, work docs, research papers, etc.) for better context and filtering.
Use exclusion strategically
Exclude large archives or reference material that you rarely search. Access them explicitly when needed with
-c collection-name.Add context metadata
Use
qmd context add to describe what each collection contains. This dramatically improves search relevance. See Context Management.