index command scans every Markdown file in your vault, parses frontmatter and wikilinks, and writes the results into the search index used by all other commands. It must be run at least once before search, query, get, links, backlinks, types, or edges will work. After the initial index, run it again whenever your notes change to keep results current.
Synopsis
Flags
boolean
Build a complete replacement index from scratch. Every
note is re-read, re-hashed, and re-written, and all edge resolutions are
recomputed. The replacement is built and validated in a sibling directory,
then atomically swapped into place. Any failure leaves the last good index
readable. Use this after renaming or moving many files. For a damaged index,
smolbren repair is the explicit recovery command.string
Name of the vault to index. Defaults to the configured default vault. Use
smolbren vault list to see registered vault names.Output
index returns a single JSON object summarising what happened during the run.
Incremental vs full rebuild
Incremental (default) — smolbren checks each file’s modification time and size before reading it. Files with unchanged metadata are skipped immediately. Files that are read but whose content hash matches the stored hash are updated in place (mtime converges) without triggering an edge recomputation. Only genuinely changed, added, or removed files are written to the dataset. This makes subsequent runs very fast on large vaults. Full rebuild (--full) — smolbren ignores all stored note and edge state,
builds fresh datasets beside the live index, validates them, preserves existing
embeddings, and performs a same-filesystem directory swap. Use a full rebuild when:
- You have renamed or moved many files and want to recompute all edge resolutions from a clean state.
- The incremental state appears corrupted or out of sync.
- You want to verify the
unresolved_edgescount is accurate across the whole vault.