Batch fetch multiple documents using glob patterns or comma-separated lists.
Usage
qmd multi-get < patter n > [options]
Either:
Glob pattern: journals/2025-*.md
Comma-separated list: readme.md, install.md, #abc123
Options
Skip files larger than this (in bytes). Large files show skip message.
Output file paths only with context
Examples
Glob Patterns
# All markdown files in subfolder
qmd multi-get 'journals/2025-*.md'
# All files matching pattern
qmd multi-get '**/*-notes.md'
# Specific month
qmd multi-get 'journals/2025-05-*.md'
Comma-Separated Lists
# Multiple filenames
qmd multi-get 'readme.md, install.md, guide.md'
# Mix of paths and docids
qmd multi-get 'notes/readme.md, #abc123, guides/install.md'
# Virtual paths
qmd multi-get 'qmd://docs/api.md, qmd://notes/changelog.md'
With Options
# Limit lines per file
qmd multi-get 'journals/*.md' -l 50
# Increase size limit
qmd multi-get 'docs/*.md' --max-bytes 50000
# JSON output
qmd multi-get 'readme.md, install.md' --json
# Export to CSV
qmd multi-get '**/*.md' --csv > export.csv
CLI (default)
Separated with dividers, shows context headers:
============================================================
File: qmd://notes/readme.md
============================================================
Folder Context: Project documentation
---
# Readme
...
============================================================
File: qmd://notes/install.md
============================================================
...
JSON
Array of objects:
[
{
"file" : "qmd://notes/readme.md" ,
"title" : "Readme" ,
"context" : "Project documentation" ,
"body" : "# Readme \n ..."
}
]
Skipped files (too large):
{
"file" : "qmd://notes/large.md" ,
"title" : "Large File" ,
"skipped" : true ,
"reason" : "File too large (150KB > 10KB). Use 'qmd get ...' to retrieve."
}
CSV
Columns: file,title,context,skipped,body
Markdown
Formatted with headings:
---
# Readme
* *context:** Project documentation
# Readme content...
XML
<? xml version = "1.0" encoding = "UTF-8" ?>
< documents >
< document >
< file > qmd://notes/readme.md </ file >
< title > Readme </ title >
< context > Project documentation </ context >
< body > ... </ body >
</ document >
</ documents >
Files
Simple list with context:
qmd://notes/readme.md,"Project documentation"
qmd://notes/install.md,"Installation guide"
Size Limits
Files larger than --max-bytes (default 10KB) are skipped to prevent overwhelming output:
# Default: skip files > 10KB
qmd multi-get '*.md'
# Increase to 50KB
qmd multi-get '*.md' --max-bytes 51200
# For large files, use get instead:
qmd get large-file.md
Skipped files show a message with the reason and suggest using qmd get.
Line Truncation
With -l, each file is truncated:
# Show first 100 lines per file
qmd multi-get 'journals/*.md' -l 100
Truncated files show: [... truncated N more lines]
qmd get Retrieve single document
qmd search Search for documents
qmd ls List files in collection