CLAUDE.md · tobi/qmd
CLAUDE.md from tobi/qmd: 194 lines covering Commands, Collection Management, Context Management, Document IDs (docid) and more.
Template by tobi
Chalk Labs
Need help deploying CLAUDE.md · tobi/qmd?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/tobi/qmd/main/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: knowledge-base, prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 194 lines
- File
CLAUDE.md
Sections
- Commands
- Collection Management
- Context Management
- Document IDs (docid)
- Options
- Development
- Tests
- Architecture
- Important: Do NOT run automatically
- Do NOT compile
- Releasing
First lines (shown under the repo's MIT license)
# QMD - Query Markup Documents
Use Bun instead of Node.js (`bun` not `node`, `bun install` not `npm install`).
## Commands
```sh
qmd collection add . --name <n> # Create/index collection
qmd collection list # List all collections with details
qmd collection remove <name> # Remove a collection by name
qmd collection rename <old> <new> # Rename a collection
qmd collection metadata [name...] # Discover metadata keys, types, and value counts (--match, --filter, --key-limit, --value-limit)
qmd init # Create a project-local .qmd index
qmd ls [collection[/path]] # List collections or files in a collection
qmd context add [path] "text" # Add context for path (defaults to current dir)
qmd context list # List all contexts
qmd context check # Check for collections/paths missing context
qmd context rm <path> # Remove context
qmd get <file>[:from[:count]] # Get by path or docid (#abc123); optional line range
qmd multi-get <pattern> # Get multiple docs by glob or comma-separated list
qmd status # Show index status and collections
qmd doctor # Diagnose config, index, model, and device issues
qmd update # Re-index collections; configured update hooks run first
qmd trust [list|revoke] # Approve a checked-in .qmd config's hooks/paths/models
qmd embed # Generate vector embeddings (uses node-llama-cpp)
qmd query <query> # Search with query expansion + reranking (recommended)
qmd search <query> # Full-text keyword search (BM25, no LLM)
qmd vsearch <query> # Vector similarity search (no reranking)
qmd bench <fixture.json> # Run search-quality benchmarks
qmd mcp # Start MCP server (stdio transport)
qmd mcp --http [--port N] # Start MCP server (HTTP, default port 8181)
qmd mcp --http --daemon # Start as background daemon
qmd mcp stop # Stop background MCP daemon
```
## Collection Management
```sh
# List all collections
qmd collection list
# Create a collection with explicit name
qmd collection add ~/Documents/notes --name mynotes --mask '**/*.md'
# Remove a collection
qmd collection remove mynotes
# Rename a collection
qmd collection rename mynotes my-notes
# Show collection details, including the top metadata keys
qmd collection show mynotes
# Discover metadata keys and values to filter on
qmd collection metadata mynotes
qmd collection metadata mynotes --match '{"field":"key","operator":"eq","value":"topics"}'
qmd collection metadata mynotes --match '{"field":"value","operator":"eq","value":"docs-team"}'
qmd collection metadata mynotes --match '{"field":"key","operator":"eq","value":"topics"}' --filter '{"field":"status","operator":"eq","value":"published"}'
qmd collection metadata mynotes --key-limit 50 --key-offset 50 # next page of keys
# Set or clear the pre-update hook (runs before re-indexing on `qmd update`)
qmd collection update-cmd mynotes 'git pull --ff-only'
qmd collection update-cmd mynotes # clear
# Include or exclude from default (unscoped) queries
qmd collection exclude mynotes
qmd collection include mynotes
# List all files in a collection
qmd ls mynotes
# List files with a path prefix
qmd ls journals/2025
qmd ls qmd://journals/2025
```
## Context Management
```sh
# Add context to current directory (auto-detects collection)
qmd context add "Description of these files"
# Add context to a specific path
qmd context add /subfolder "Description for subfolder"
# Add global context to all collections (system message)
qmd context add / "Always include this context"
# Add context using virtual paths
qmd context add qmd://journals/ "Context for entire journals collection"
qmd context add qmd://journals/2024 "Journal entries from 2024"
# List all contexts
qmd context list
# Check for collections or paths without context
qmd context check
# Remove context
qmd context rm qmd://journals/2024
qmd context rm / # Remove global context
```
## Document IDs (docid)
Each document has a unique short ID (docid) - the first 6 characters of its content hash.
Docids are shown in search results as `#abc123` and can be used with `get` and `multi-get`:
```sh
# Search returns docid in results
qmd search "query" --json
# Output: [{"docid": "#abc123", "score": 0.85, "file": "docs/readme.md", ...}]
# Get document by docid
qmd get "#abc123"
qmd get abc123 # Leading # is optional
# Docids also work in multi-get comma-separated lists
qmd multi-get "#abc123, #def456"
```
## Options
```sh
# Search & retrieval
-c, --collection <name> # Restrict search to collection(s) (repeatable)
-n <num> # Number of results
--all # Return all matches
--min-score <num> # Minimum score threshold
--full # Show full document content
--intent <text> # Describe what you're after to sharpen ranking (query)
--no-rerank # Skip LLM reranking (faster, lower quality)
--full-path # Show on-disk paths instead of qmd:// URIs
# Get / multi-get
-l <num> # Maximum lines per file
--max-bytes <num> # Skip files larger than this (default 10KB)
--no-line-numbers # Disable line numbers (on by default for get/multi-get)
# Output format (search, query, multi-get)
--format <kind> # cli (default) | json | csv | md | xml | files
# legacy --json/--csv/--md/--xml/--files still work as aliases
```
## Development
```sh
bun src/cli/qmd.ts <command> # Run from source
bun link # Install globally as 'qmd'
```
## Tests
All tests live in `test/`. Run everything:
```sh
npx vitest run --reporter=verbose test/
bun test --preload ./src/test-preload.ts test/
```Signals
- Stars
- 30,607
- Forks
- 1,926
- Open issues
- 122
- Last commit (this folder)
- Sep 17, 2026 (1 month ago)
- Last release
- Aug 16, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/tobi/qmd
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tobi
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get CLAUDE.md · tobi/qmd running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
CLAUDE.md · tobi/qmd. Agent Mart. https://agentmart.dev/templates/tobi-qmd-claude-md (last updated 2026-10-24)