noahdunnagan/fsearch
Summary
Noah Dunnagan’s FSearch is an MIT-licensed Rust whole-disk file search for macOS, usable as a CLI with a small daemon or as a crate.
Speed numbers.
On an M4 Max with 7.7M files: name search p50 1.3 ms, content search p50 9 ms, changes visible in about 0.1 s, a one-time 20 s crawl, and 30 to 135 MB of daemon memory.
Finds any file by name in about a millisecond, forgives typos, and searches inside files with an index.
Matches are read fresh from disk, so they're never stale.
Versus fff.
On Chromium’s 509k files it reports 1.1 ms versus 13.8 ms for names, 5.6 ms versus 53 ms for contents, and 50 MB versus 358 MB of memory, though fff searches about 9% more files.
Query language.
Fuzzy words with one-typo tolerance for 5+ letter words, plus exact, prefix, suffix, and exclude operators and filters like ext, type, size, mtime, regex, grep, and sym.
Integration.
A JSON-lines socket API or stdio mode, a linkable Rust crate, and one shared index across apps and the CLI.
How it works.
A single getattrlistbulk crawl kept current by FSEvents, names in one mmap’d file laid out folder by folder, and a trigram index over text files.
Without access it skips the protected folders instead of popping a prompt.
Highlights
An app and the CLI share one index: the first process owns it and the others follow along.
Read the original ↗Save to Sponge
Summarized with Sponge. Quotes are the author’s own words.