| allowed-tools |
|
|||
|---|---|---|---|---|
| description | Set up @tobilu/qmd semantic search for mnemonic memories. Registers collections, builds indexes, and generates embeddings. Run this once per machine. | |||
| name | qmd-setup | |||
| user-invocable | true |
Bootstrap @tobilu/qmd for semantic search over mnemonic memories.
- Node.js >= 22 —
node --version - qmd CLI —
npm i -g @tobilu/qmd
Run the setup script:
bash tools/qmd-setup.shThe script will:
- Check prerequisites (Node.js >= 22, qmd installed)
- Resolve
MNEMONIC_ROOTfrom~/.config/mnemonic/config.json - Discover memory roots dynamically:
{MNEMONIC_ROOT}/{org}/→ collectionmnemonic-{org}{MNEMONIC_ROOT}/default/→ collectionmnemonic-default.claude/mnemonic/→ collectionmnemonic-project
- Run
qmd update(index) +qmd embed(embeddings) - Validate with
qmd statusand a test search
Note: First
qmd embeddownloads ~2 GB of GGUF models.
If you prefer to set up manually:
MNEMONIC_ROOT is resolved from ~/.config/mnemonic/config.json (defaults to
~/.local/share/mnemonic). Adjust the paths below to match your config:
# 1. Register collections (replace paths with your MNEMONIC_ROOT)
qmd collection add "${MNEMONIC_ROOT:-$HOME/.local/share/mnemonic}/zircote/" --name mnemonic-zircote
qmd collection add "${MNEMONIC_ROOT:-$HOME/.local/share/mnemonic}/default/" --name mnemonic-default
qmd collection add "$(git rev-parse --show-toplevel)/.claude/mnemonic/" --name mnemonic-project # if exists
# 2. Build index
qmd update
# 3. Generate embeddings (downloads models on first run)
qmd embed
# 4. Validate
qmd status
qmd search "test" -n 3Use search commands:
| Command | Type | Requires |
|---|---|---|
qmd search "query" |
BM25 keyword | qmd update |
qmd vsearch "query" |
Semantic vector | qmd embed |
qmd query "query" |
Hybrid (BM25 + vector) | Both |
Scope to a specific collection:
qmd search "auth" -c mnemonic-zircote # org memories only
qmd search "auth" -c mnemonic-project # this repo only
qmd search "auth" # all collectionsAfter adding new memories, re-index with /mnemonic:qmd-reindex or:
qmd update && qmd embedIndexing is not automatic — run after captures or bulk imports.