How pranavsandeep/sprawl works
Sprawl is a Windows command-line file-name search tool. The user initializes an index for a folder, searches by name, chooses a match, and Sprawl opens its location in Explorer. Initialization walks files and builds trigram postings plus path and document-ID mappings; a companion process then consumes NTFS journal changes to keep those structures current. The README is empty, so the documented product surface is inferred from the command handling in sprawl/src/main.rs. Some updater and CLI implementation is unsampled; links below reflect only visible calls and the described behavior in sampled code.
Main entry points: update_helper.rs Change handlers · main.rs Initialize index · index.rs Trigram index access · path_list.rs Path mappings
Components 19
Interactive CLI
- CLI commands
sprawl/src/main.rs - Initialize index
sprawl/src/main.rs - Search and select
sprawl/src/main.rs
Index and search
- Filesystem walk
sprawl-core/src/dir_walk.rs - Trigram generation
sprawl-core/src/util.rs - Trigram index access
sprawl-core/src/index.rs
Index state
- Path mappings
sprawl-core/src/path_list.rs - Document mappings
sprawl-core/src/doc_store.rs - Trigram postings
- Path databases
- Document databases
Live updates
- Journal updater
sprawl-search/src/main.rs - Change handlers
sprawl-search/src/update_helper.rs - Windows journal access
sprawl-core/src/win_helper.rs - Control pipe
Other components
- User
- Windows Explorer
- NTFS journal
- Indexed filesystem
Connections 29
- User → CLI commands: enters commands
- CLI commands → Initialize index: dispatches init
- CLI commands → Search and select: dispatches search
- Initialize index → Filesystem walk: walks folders
- Initialize index → Path mappings: builds mappings
- Initialize index → Trigram generation: generates keys
- Initialize index → Trigram index access: builds index
- Initialize index → Document mappings: creates mappings
- Filesystem walk → Indexed filesystem: reads files
- Path mappings → Path databases: reads and writes
- Trigram index access → Trigram postings: reads and writes
- Document mappings → Document databases: reads and writes
- Search and select → Trigram generation: generates query keys
- Search and select → Trigram index access: looks up matches
- Search and select → Document mappings: resolves matches
- Search and select → Path mappings: resolves paths
- Search and select → Windows Explorer: opens selection
- Journal updater → Windows journal access: queries journal
- Windows journal access → NTFS journal: reads changes
- Journal updater → Change handlers: handles events
- Change handlers → Trigram generation: generates keys
- Change handlers → Trigram index access: updates postings
- Change handlers → Path mappings: updates paths
- Change handlers → Document mappings: updates mappings
- Change handlers → Trigram postings: writes postings
- Change handlers → Path databases: writes paths
- Change handlers → Document databases: writes mappings
- CLI commands → Control pipe: signals pause
- Journal updater → Control pipe: listens for control