index
Build or update the search index. Walks repository files, parses them with Tree-sitter (or pulldown-cmark for Markdown), generates embeddings, and stores everything in LanceDB.
Usage
bobbin index [PATH] [OPTIONS]
Examples
bobbin index # Full index of current directory
bobbin index --incremental # Only update changed files
bobbin index --force # Force reindex all files
bobbin index --repo myproject # Tag chunks with a repository name
bobbin index --source /other/repo --repo other # Index a different directory
Options
| Flag | Short | Description |
|---|---|---|
--incremental | Only update changed files | |
--force | Force reindex all files | |
--repo <NAME> | Repository name for multi-repo indexing (default: “default”) | |
--source <PATH> | Source directory to index files from (defaults to path) | |
--include-beads | Also index beads (issues) from Dolt |
To reindex one bead without re-fetching the whole bead corpus, use
index-bead.
Maintenance and recovery
Each index run ends with a Lance maintenance sweep (pruning old table versions and compacting fragments). Two properties of that sweep are worth knowing when you run bobbin index on a schedule:
- Maintenance failures fail the command. A sweep that errors makes
bobbin indexexit non-zero instead of reporting success with a silently skipped compaction. Lock contention is the one non-error outcome: a sweep starved by another process’s lock is reported loudly on stderr (even under--quietand--json) and labeledskipped_lock_heldin--jsonoutput. - FTS compaction panics recover truthfully. Lance’s incremental full-text-index remap can panic while compacting the chunks table. When exactly that failure is detected, bobbin rebuilds the FTS index from scratch — discarding the broken incremental generation — and retries the compaction once. Unrelated compaction errors (I/O, schema, out of memory) are never treated as rebuildable and surface as-is.