{"owner":"tobi","repo":"qmd","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# QMD - Query Markup Documents\n\nUse Bun instead of Node.js (`bun` not `node`, `bun install` not `npm install`).\n\n## Commands\n\n```sh\nqmd collection add . --name <n>   # Create/index collection\nqmd collection list               # List all collections with details\nqmd collection remove <name>      # Remove a collection by name\nqmd collection rename <old> <new> # Rename a collection\nqmd init                          # Create a project-local .qmd index\nqmd ls [collection[/path]]        # List collections or files in a collection\nqmd context add [path] \"text\"     # Add context for path (defaults to current dir)\nqmd context list                  # List all contexts\nqmd context check                 # Check for collections/paths missing context\nqmd context rm <path>             # Remove context\nqmd get <file>[:from[:count]]     # Get by path or docid (#abc123); optional line range\nqmd multi-get <pattern>           # Get multiple docs by glob or comma-separated list\nqmd status                        # Show index status and collections\nqmd doctor                        # Diagnose config, index, model, and device issues\nqmd update                        # Re-index collections; configured update hooks run first\nqmd trust [list|revoke]           # Approve a checked-in .qmd config's hooks/paths/models\nqmd embed                         # Generate vector embeddings (uses node-llama-cpp)\nqmd query <query>                 # Search with query expansion + reranking (recommended)\nqmd search <query>                # Full-text keyword search (BM25, no LLM)\nqmd vsearch <query>               # Vector similarity search (no reranking)\nqmd bench <fixture.json>          # Run search-quality benchmarks\nqmd mcp                           # Start MCP server (stdio transport)\nqmd mcp --http [--port N]         # Start MCP server (HTTP, default port 8181)\nqmd mcp --http --daemon           # Start as background daemon\nqmd mcp stop                      # Stop background MCP daemon\n```\n\n## Collection Management\n\n```sh\n# List all collections\nqmd collection list\n\n# Create a collection with explicit name\nqmd collection add ~/Documents/notes --name mynotes --mask '**/*.md'\n\n# Remove a collection\nqmd collection remove mynotes\n\n# Rename a collection\nqmd collection rename mynotes my-notes\n\n# Show collection details\nqmd collection show mynotes\n\n# Set or clear the pre-update hook (runs before re-indexing on `qmd update`)\nqmd collection update-cmd mynotes 'git pull --ff-only'\nqmd collection update-cmd mynotes            # clear\n\n# Include or exclude from default (unscoped) queries\nqmd collection exclude mynotes\nqmd collection include mynotes\n\n# List all files in a collection\nqmd ls mynotes\n\n# List files with a path prefix\nqmd ls journals/2025\nqmd ls qmd://journals/2025\n```\n\n## Context Management\n\n```sh\n# Add context to current directory (auto-detects collection)\nqmd context add \"Description of these files\"\n\n# Add context to a specific path\nqmd context add /subfolder \"Description for subfolder\"\n\n# Add global context to all collections (system message)\nqmd context add / \"Always include this context\"\n\n# Add context using virtual paths\nqmd context add qmd://journals/ \"Context for entire journals collection\"\nqmd context add qmd://journals/2024 \"Journal entries from 2024\"\n\n# List all contexts\nqmd context list\n\n# Check for collections or paths without context\nqmd context check\n\n# Remove context\nqmd context rm qmd://journals/2024\nqmd context rm /  # Remove global context\n```\n\n## Document IDs (docid)\n\nEach document has a unique short ID (docid) - the first 6 characters of its content hash.\nDocids are shown in search results as `#abc123` and can be used with `get` and `multi-get`:\n\n```sh\n# Search returns docid in results\nqmd search \"query\" --json\n# Output: [{\"docid\": \"#abc123\", \"score\": 0.85, \"file\": \"docs/readme.md\", ...}]\n\n# Get document by docid\nqmd get \"#abc123\"\nqmd get abc123              # Leading # is optional\n\n# Docids also work in multi-get comma-separated lists\nqmd multi-get \"#abc123, #def456\"\n```\n\n## Options\n\n```sh\n# Search & retrieval\n-c, --collection <name>  # Restrict search to collection(s) (repeatable)\n-n <num>                 # Number of results\n--all                    # Return all matches\n--min-score <num>        # Minimum score threshold\n--full                   # Show full document content\n--intent <text>          # Describe what you're after to sharpen ranking (query)\n--no-rerank              # Skip LLM reranking (faster, lower quality)\n--full-path              # Show on-disk paths instead of qmd:// URIs\n\n# Get / multi-get\n-l <num>                 # Maximum lines per file\n--max-bytes <num>        # Skip files larger than this (default 10KB)\n--no-line-numbers        # Disable line numbers (on by default for get/multi-get)\n\n# Output format (search, query, multi-get)\n--format <kind>          # cli (default) | json | csv | md | xml | files\n                         # legacy --json/--csv/--md/--xml/--files still work as aliases\n```\n\n## Development\n\n```sh\nbun src/cli/qmd.ts <command>   # Run from source\nbun link               # Install globally as 'qmd'\n```\n\n## Tests\n\nAll tests live in `test/`. Run everything:\n\n```sh\nnpx vitest run --reporter=verbose test/\nbun test --preload ./src/test-preload.ts test/\n```\n\n## Architecture\n\n- SQLite FTS5 for full-text search (BM25)\n- sqlite-vec for vector similarity search\n- node-llama-cpp for embeddings (embeddinggemma), reranking (qwen3-reranker), and query expansion (Qwen3)\n- Reciprocal Rank Fusion (RRF) for combining results\n- Smart chunking: 900 tokens/chunk with 15% overlap, prefers markdown headings as boundaries\n- AST-aware chunking: use `--chunk-strategy auto` to chunk code files (.ts/.js/.py/.go/.rs) at function/class/import boundaries via tree-sitter. Default is `regex` (existing behavior). Markdown and unknown file types always use regex chunking.\n\n## Important: Do NOT run automatically\n\n- Never run `qmd collection add`, `qmd embed`, or `qmd update` automatically\n- Never modify the SQLite database directly\n- Write out example commands for the user to run manually\n- Index is stored at `~/.cache/qmd/index.sqlite`\n\n## Do NOT compile\n\n- Never run `bun build --compile` - it overwrites the shell wrapper and breaks sqlite-vec\n- The `qmd` file is a shell script that runs compiled JS from `dist/` - do not replace it\n- `npm run build` compiles TypeScript to `dist/` via `tsc -p tsconfig.build.json`\n\n## Releasing\n\nUse `/release <version>` to cut a release. Full changelog standards,\nrelease workflow, and git hook setup are documented in the\n[release skill](skills/release/SKILL.md).\n\nKey points:\n- Add changelog entries under `## [Unreleased]` **as you make changes**\n- The release script renames `[Unreleased]` → `[X.Y.Z] - date` at release time\n- Credit external PRs with `#NNN (thanks @username)`\n- GitHub releases roll up the full minor series (e.g. 1.2.0 through 1.2.3)\n"},"files":{"CLAUDE.md":"# QMD - Query Markup Documents\n\nUse Bun instead of Node.js (`bun` not `node`, `bun install` not `npm install`).\n\n## Commands\n\n```sh\nqmd collection add . --name <n>   # Create/index collection\nqmd collection list               # List all collections with details\nqmd collection remove <name>      # Remove a collection by name\nqmd collection rename <old> <new> # Rename a collection\nqmd init                          # Create a project-local .qmd index\nqmd ls [collection[/path]]        # List collections or files in a collection\nqmd context add [path] \"text\"     # Add context for path (defaults to current dir)\nqmd context list                  # List all contexts\nqmd context check                 # Check for collections/paths missing context\nqmd context rm <path>             # Remove context\nqmd get <file>[:from[:count]]     # Get by path or docid (#abc123); optional line range\nqmd multi-get <pattern>           # Get multiple docs by glob or comma-separated list\nqmd status                        # Show index status and collections\nqmd doctor                        # Diagnose config, index, model, and device issues\nqmd update                        # Re-index collections; configured update hooks run first\nqmd trust [list|revoke]           # Approve a checked-in .qmd config's hooks/paths/models\nqmd embed                         # Generate vector embeddings (uses node-llama-cpp)\nqmd query <query>                 # Search with query expansion + reranking (recommended)\nqmd search <query>                # Full-text keyword search (BM25, no LLM)\nqmd vsearch <query>               # Vector similarity search (no reranking)\nqmd bench <fixture.json>          # Run search-quality benchmarks\nqmd mcp                           # Start MCP server (stdio transport)\nqmd mcp --http [--port N]         # Start MCP server (HTTP, default port 8181)\nqmd mcp --http --daemon           # Start as background daemon\nqmd mcp stop                      # Stop background MCP daemon\n```\n\n## Collection Management\n\n```sh\n# List all collections\nqmd collection list\n\n# Create a collection with explicit name\nqmd collection add ~/Documents/notes --name mynotes --mask '**/*.md'\n\n# Remove a collection\nqmd collection remove mynotes\n\n# Rename a collection\nqmd collection rename mynotes my-notes\n\n# Show collection details\nqmd collection show mynotes\n\n# Set or clear the pre-update hook (runs before re-indexing on `qmd update`)\nqmd collection update-cmd mynotes 'git pull --ff-only'\nqmd collection update-cmd mynotes            # clear\n\n# Include or exclude from default (unscoped) queries\nqmd collection exclude mynotes\nqmd collection include mynotes\n\n# List all files in a collection\nqmd ls mynotes\n\n# List files with a path prefix\nqmd ls journals/2025\nqmd ls qmd://journals/2025\n```\n\n## Context Management\n\n```sh\n# Add context to current directory (auto-detects collection)\nqmd context add \"Description of these files\"\n\n# Add context to a specific path\nqmd context add /subfolder \"Description for subfolder\"\n\n# Add global context to all collections (system message)\nqmd context add / \"Always include this context\"\n\n# Add context using virtual paths\nqmd context add qmd://journals/ \"Context for entire journals collection\"\nqmd context add qmd://journals/2024 \"Journal entries from 2024\"\n\n# List all contexts\nqmd context list\n\n# Check for collections or paths without context\nqmd context check\n\n# Remove context\nqmd context rm qmd://journals/2024\nqmd context rm /  # Remove global context\n```\n\n## Document IDs (docid)\n\nEach document has a unique short ID (docid) - the first 6 characters of its content hash.\nDocids are shown in search results as `#abc123` and can be used with `get` and `multi-get`:\n\n```sh\n# Search returns docid in results\nqmd search \"query\" --json\n# Output: [{\"docid\": \"#abc123\", \"score\": 0.85, \"file\": \"docs/readme.md\", ...}]\n\n# Get document by docid\nqmd get \"#abc123\"\nqmd get abc123              # Leading # is optional\n\n# Docids also work in multi-get comma-separated lists\nqmd multi-get \"#abc123, #def456\"\n```\n\n## Options\n\n```sh\n# Search & retrieval\n-c, --collection <name>  # Restrict search to collection(s) (repeatable)\n-n <num>                 # Number of results\n--all                    # Return all matches\n--min-score <num>        # Minimum score threshold\n--full                   # Show full document content\n--intent <text>          # Describe what you're after to sharpen ranking (query)\n--no-rerank              # Skip LLM reranking (faster, lower quality)\n--full-path              # Show on-disk paths instead of qmd:// URIs\n\n# Get / multi-get\n-l <num>                 # Maximum lines per file\n--max-bytes <num>        # Skip files larger than this (default 10KB)\n--no-line-numbers        # Disable line numbers (on by default for get/multi-get)\n\n# Output format (search, query, multi-get)\n--format <kind>          # cli (default) | json | csv | md | xml | files\n                         # legacy --json/--csv/--md/--xml/--files still work as aliases\n```\n\n## Development\n\n```sh\nbun src/cli/qmd.ts <command>   # Run from source\nbun link               # Install globally as 'qmd'\n```\n\n## Tests\n\nAll tests live in `test/`. Run everything:\n\n```sh\nnpx vitest run --reporter=verbose test/\nbun test --preload ./src/test-preload.ts test/\n```\n\n## Architecture\n\n- SQLite FTS5 for full-text search (BM25)\n- sqlite-vec for vector similarity search\n- node-llama-cpp for embeddings (embeddinggemma), reranking (qwen3-reranker), and query expansion (Qwen3)\n- Reciprocal Rank Fusion (RRF) for combining results\n- Smart chunking: 900 tokens/chunk with 15% overlap, prefers markdown headings as boundaries\n- AST-aware chunking: use `--chunk-strategy auto` to chunk code files (.ts/.js/.py/.go/.rs) at function/class/import boundaries via tree-sitter. Default is `regex` (existing behavior). Markdown and unknown file types always use regex chunking.\n\n## Important: Do NOT run automatically\n\n- Never run `qmd collection add`, `qmd embed`, or `qmd update` automatically\n- Never modify the SQLite database directly\n- Write out example commands for the user to run manually\n- Index is stored at `~/.cache/qmd/index.sqlite`\n\n## Do NOT compile\n\n- Never run `bun build --compile` - it overwrites the shell wrapper and breaks sqlite-vec\n- The `qmd` file is a shell script that runs compiled JS from `dist/` - do not replace it\n- `npm run build` compiles TypeScript to `dist/` via `tsc -p tsconfig.build.json`\n\n## Releasing\n\nUse `/release <version>` to cut a release. Full changelog standards,\nrelease workflow, and git hook setup are documented in the\n[release skill](skills/release/SKILL.md).\n\nKey points:\n- Add changelog entries under `## [Unreleased]` **as you make changes**\n- The release script renames `[Unreleased]` → `[X.Y.Z] - date` at release time\n- Credit external PRs with `#NNN (thanks @username)`\n- GitHub releases roll up the full minor series (e.g. 1.2.0 through 1.2.3)\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# QMD - Query Markup Documents\n\nUse Bun instead of Node.js (`bun` not `node`, `bun install` not `npm install`).\n\n## Commands\n\n```sh\nqmd collection add . --name <n>   # Create/index collection\nqmd collection list               # List all collections with details\nqmd collection remove <name>      # Remove a collection by name\nqmd collection rename <old> <new> # Rename a collection\nqmd init                          # Create a project-local .qmd index\nqmd ls [collection[/path]]        # List collections or files in a collection\nqmd context add [path] \"text\"     # Add context for path (defaults to current dir)\nqmd context list                  # List all contexts\nqmd context check                 # Check for collections/paths missing context\nqmd context rm <path>             # Remove context\nqmd get <file>[:from[:count]]     # Get by path or docid (#abc123); optional line range\nqmd multi-get <pattern>           # Get multiple docs by glob or comma-separated list\nqmd status                        # Show index status and collections\nqmd doctor                        # Diagnose config, index, model, and device issues\nqmd update                        # Re-index collections; configured update hooks run first\nqmd trust [list|revoke]           # Approve a checked-in .qmd config's hooks/paths/models\nqmd embed                         # Generate vector embeddings (uses node-llama-cpp)\nqmd query <query>                 # Search with query expansion + reranking (recommended)\nqmd search <query>                # Full-text keyword search (BM25, no LLM)\nqmd vsearch <query>               # Vector similarity search (no reranking)\nqmd bench <fixture.json>          # Run search-quality benchmarks\nqmd mcp                           # Start MCP server (stdio transport)\nqmd mcp --http [--port N]         # Start MCP server (HTTP, default port 8181)\nqmd mcp --http --daemon           # Start as background daemon\nqmd mcp stop                      # Stop background MCP daemon\n```\n\n## Collection Management\n\n```sh\n# List all collections\nqmd collection list\n\n# Create a collection with explicit name\nqmd collection add ~/Documents/notes --name mynotes --mask '**/*.md'\n\n# Remove a collection\nqmd collection remove mynotes\n\n# Rename a collection\nqmd collection rename mynotes my-notes\n\n# Show collection details\nqmd collection show mynotes\n\n# Set or clear the pre-update hook (runs before re-indexing on `qmd update`)\nqmd collection update-cmd mynotes 'git pull --ff-only'\nqmd collection update-cmd mynotes            # clear\n\n# Include or exclude from default (unscoped) queries\nqmd collection exclude mynotes\nqmd collection include mynotes\n\n# List all files in a collection\nqmd ls mynotes\n\n# List files with a path prefix\nqmd ls journals/2025\nqmd ls qmd://journals/2025\n```\n\n## Context Management\n\n```sh\n# Add context to current directory (auto-detects collection)\nqmd context add \"Description of these files\"\n\n# Add context to a specific path\nqmd context add /subfolder \"Description for subfolder\"\n\n# Add global context to all collections (system message)\nqmd context add / \"Always include this context\"\n\n# Add context using virtual paths\nqmd context add qmd://journals/ \"Context for entire journals collection\"\nqmd context add qmd://journals/2024 \"Journal entries from 2024\"\n\n# List all contexts\nqmd context list\n\n# Check for collections or paths without context\nqmd context check\n\n# Remove context\nqmd context rm qmd://journals/2024\nqmd context rm /  # Remove global context\n```\n\n## Document IDs (docid)\n\nEach document has a unique short ID (docid) - the first 6 characters of its content hash.\nDocids are shown in search results as `#abc123` and can be used with `get` and `multi-get`:\n\n```sh\n# Search returns docid in results\nqmd search \"query\" --json\n# Output: [{\"docid\": \"#abc123\", \"score\": 0.85, \"file\": \"docs/readme.md\", ...}]\n\n# Get document by docid\nqmd get \"#abc123\"\nqmd get abc123              # Leading # is optional\n\n# Docids also work in multi-get comma-separated lists\nqmd multi-get \"#abc123, #def456\"\n```\n\n## Options\n\n```sh\n# Search & retrieval\n-c, --collection <name>  # Restrict search to collection(s) (repeatable)\n-n <num>                 # Number of results\n--all                    # Return all matches\n--min-score <num>        # Minimum score threshold\n--full                   # Show full document content\n--intent <text>          # Describe what you're after to sharpen ranking (query)\n--no-rerank              # Skip LLM reranking (faster, lower quality)\n--full-path              # Show on-disk paths instead of qmd:// URIs\n\n# Get / multi-get\n-l <num>                 # Maximum lines per file\n--max-bytes <num>        # Skip files larger than this (default 10KB)\n--no-line-numbers        # Disable line numbers (on by default for get/multi-get)\n\n# Output format (search, query, multi-get)\n--format <kind>          # cli (default) | json | csv | md | xml | files\n                         # legacy --json/--csv/--md/--xml/--files still work as aliases\n```\n\n## Development\n\n```sh\nbun src/cli/qmd.ts <command>   # Run from source\nbun link               # Install globally as 'qmd'\n```\n\n## Tests\n\nAll tests live in `test/`. Run everything:\n\n```sh\nnpx vitest run --reporter=verbose test/\nbun test --preload ./src/test-preload.ts test/\n```\n\n## Architecture\n\n- SQLite FTS5 for full-text search (BM25)\n- sqlite-vec for vector similarity search\n- node-llama-cpp for embeddings (embeddinggemma), reranking (qwen3-reranker), and query expansion (Qwen3)\n- Reciprocal Rank Fusion (RRF) for combining results\n- Smart chunking: 900 tokens/chunk with 15% overlap, prefers markdown headings as boundaries\n- AST-aware chunking: use `--chunk-strategy auto` to chunk code files (.ts/.js/.py/.go/.rs) at function/class/import boundaries via tree-sitter. Default is `regex` (existing behavior). Markdown and unknown file types always use regex chunking.\n\n## Important: Do NOT run automatically\n\n- Never run `qmd collection add`, `qmd embed`, or `qmd update` automatically\n- Never modify the SQLite database directly\n- Write out example commands for the user to run manually\n- Index is stored at `~/.cache/qmd/index.sqlite`\n\n## Do NOT compile\n\n- Never run `bun build --compile` - it overwrites the shell wrapper and breaks sqlite-vec\n- The `qmd` file is a shell script that runs compiled JS from `dist/` - do not replace it\n- `npm run build` compiles TypeScript to `dist/` via `tsc -p tsconfig.build.json`\n\n## Releasing\n\nUse `/release <version>` to cut a release. Full changelog standards,\nrelease workflow, and git hook setup are documented in the\n[release skill](skills/release/SKILL.md).\n\nKey points:\n- Add changelog entries under `## [Unreleased]` **as you make changes**\n- The release script renames `[Unreleased]` → `[X.Y.Z] - date` at release time\n- Credit external PRs with `#NNN (thanks @username)`\n- GitHub releases roll up the full minor series (e.g. 1.2.0 through 1.2.3)\n","category":"root","tokens":1722}]}