Index Command
zetl index builds or refreshes the link index for a vault.
Usage
zetl -d ./my-vault index
What it does
- Scans all
.mdfiles in the vault directory (recursively) - Parses each file with pulldown-cmark, extracting concepts/Wikilinks and concepts/Spindle Lisp blocks — see architecture/Scanner
- Builds the Link Graph — a directed graph of page-to-page links
- Computes Merkle Tree hashes for content-addressable blocks
- Writes the index to
.zetl/index.json— see architecture/Cache
Incremental behavior
On subsequent runs, zetl uses two-tier cache invalidation:
- Tier 1 (mtime): If a file’s modification time hasn’t changed, skip it entirely
- Tier 2 (hash): If the mtime changed but the content hash matches, skip reprocessing
This makes re-indexing fast even for large vaults. Use --no-cache to force a full rescan.
Verbose output
With -v, zetl reports scan statistics to stderr: files scanned, files skipped, links found, SPL blocks extracted, and timing.
See also: CLI Reference, architecture/Scanner, architecture/Cache, Stats Command