vtcode-indexer
May 30, 2026 · View on GitHub
Root AGENTS.md | Lightweight workspace file indexer with Markdown-backed persistence.
Key Types
SimpleIndexer main API | SimpleIndexerConfig configuration | FileIndex entry | SearchResult match | IndexStorage trait | TraversalFilter trait | MarkdownIndexStorage default backend | ConfigTraversalFilter default filter
Rules
IndexStoragetrait is the persistence extension point. Implement for custom backends.TraversalFiltertrait controls which files/dirs are indexed.ConfigTraversalFilteris default.- Always skips
.env,.git,.DS_Store— hardcoded inshould_index_file(). SimpleIndexerConfigexcludestarget/,node_modules/,.vtcode/index/by default.- Snapshot storage (
prefers_snapshot_persistence()) writes a singleindex.md— legacy per-file.mdentries are auto-cleaned.
Testing
cargo nextest run -p vtcode-indexer. Uses tempfile::tempdir() for isolation.
Gotchas
index_directory()respects.gitignoreviaignorecrate'sWalkBuilder.path_cacheis not used here — that'svtcode-bash-runner. Indexer usesindex_cache: HashMap.- Binary/unreadable files are silently skipped (
ErrorKind::InvalidData).