Semantic CLI Commands [[semantic_commands: NarrativeDoc]]NarrativeDoc
Reference for qmdc-semantic CLI commands.
index [[cmd_sem_index: Command]]CommandSemantic Layer Namespace 87%Dump Index McpTool 78%Guide McpResource 73%
Index a QMDC workspace for semantic search.
- parser: qmdc-semantic
Description [[description: text]]textParse Workspace ExtCommand 85%Discovery Category 81%Guide McpResource 81%
Parses all QMD.md files in the workspace, chunks objects, computes embeddings, and stores them in .qmdc-semantic/embeddings.db. Uses hash-based diffing for incremental updates — only new or changed chunks are re-embedded.
Syntax [[syntax: text]]textSemantic Layer Namespace 78%MCP Server Namespace 78%Workspace Indexing Algorithm 78%
qmdc-semantic index [WORKSPACE_PATH] [OPTIONS]
| Argument | Description | Default |
|---|---|---|
| WORKSPACE_PATH | Path to workspace directory | . (current) |
Options [[options: text]]text
| Option | Description |
|---|---|
--force, -f |
Reindex all chunks (ignore hash cache) |
--verbose, -v |
Show detailed progress |
Examples [[examples: text]]textSemantic Layer Namespace 76%Parse Workspace ExtCommand 70%Content Generator ContentGenerator 69%
# Index current directory
qmdc-semantic index
# Index with verbose output
qmdc-semantic index ./my-workspace -v
# Force full reindex
qmdc-semantic index ./my-workspace --force
search [[cmd_sem_search: Command]]CommandSearch Objects McpTool 85%Discovery Category 83%CLI CLI 78%
Search for relevant objects in a QMDC workspace.
- parser: qmdc-semantic
Description [[description: text]]text
Runs hybrid search (dense + FTS5) with graph walk expansion. Supports text queries and file-based queries (impact scan). Returns ranked objects with scores and text previews.
Syntax [[syntax: text]]text
qmdc-semantic search [WORKSPACE_PATH] [QUERY] [OPTIONS]
| Argument | Description | Default |
|---|---|---|
| WORKSPACE_PATH | Path to workspace directory | . (current) |
| QUERY | Text search query | (required unless --from-file) |
Options [[options: text]]text
| Option | Description | Default |
|---|---|---|
--from-file, -f FILE |
Use file content as query | - |
--top-k, -k N |
Number of results | 10 |
--depth, -d N |
Graph walk depth | 2 |
--exclude-ns, -x NS |
Exclude namespace(s) from results (repeatable) | - |
--verbose, -v |
Show detailed output | - |
Examples [[examples: text]]text
# Simple search
qmdc-semantic search . "how to test LSP"
# Impact scan from task file
qmdc-semantic search . --from-file tasks/QMD-41/QMD-41-task.qmd.md
# More results, deeper graph walk
qmdc-semantic search . "chunking algorithm" -k 20 --depth 3
# Exclude noisy namespaces from results
qmdc-semantic search . "validation rules" -x tracking -x ideas
# Verbose output with text preview
qmdc-semantic search . "storage schema" -v