VERSUS MODE · ROUND 5
mdfind is Spotlight without the window: every attribute, every operator, scriptable. It is also a language you have to learn. Shlexball lets you write the request in English and shows you the command it ran.
24 September 2026 · 5 minute read
If you live in Terminal and know what a file contains, mdfind is exact, instant and free. If you remember what a document was about, no query will find it until you guess its words. Shlexball runs a language model on your Mac that reads your request and writes the read-only search for you.
mdfind ships with macOS and asks the Spotlight index directly. A few examples:
mdfind "q4 priorities" finds files containing those words anywhere on the Mac.mdfind -onlyin ~/Documents -name lease restricts to a folder and to file names.mdfind 'kMDItemContentType == "com.adobe.pdf" && kMDItemFSContentChangeDate >= $time.today(-30)' finds PDFs changed in the last 30 days.The last one is powerful and precise, but you have to know the attribute names, the type identifiers and the date functions. And the first one asks the same question Spotlight asked in round 1, so it returns the same kind of answer: files that contain the letters, whether or not they are about Q4 priorities.
We ran the first query on the Mac used for the Finder round. It returned 21 paths. The first few, shortened:
$ mdfind "q4 priorities" | wc -l 21 $ mdfind "q4 priorities" …/jupyterlab/static/161.fffb4847807ab2a6d16f.js …/streamlit/static/static/js/index.6xX1278W.js …/streamlit/static/static/js/index.B0H9IXUJ.js …/textblob/en/en-lexicon.txt …/Acrobat/DC/WebResources/…/desktop-gentech-chunk.js …/Steam/…/steamui/chunk~2dcc5aaf7.js …/whisper.cpp/ggml/include/ggml.h …/ggml/src/ggml-vulkan/ggml-vulkan.cpp …/how-leadership-is-changing-in-2026-…/post.template.html
Minified JavaScript from Jupyter, Streamlit, Acrobat and Steam, a word list and the source of a machine-learning library. The same files Finder showed, because it is the same index.
However much syntax you learn, the text part of an mdfind query matches words. It cannot tell that “what to tackle first this quarter” is a priorities list. It cannot rank a 4 MB export below a two-page plan. And it gives you paths, not the passage that matched, so you still open each file to check.
Shlexball is built on the same idea as a good Terminal session: small, safe, read-only commands. The difference is who writes them. You type the lease PDF from last spring; the local model turns the file type and the time window into filters, searches for the topic by meaning, and runs only commands that pass its read-only policy. Search details shows exactly what ran, so you can copy it or learn from it.
Shlexball’s model is downloaded once and runs on your Mac’s Apple silicon. Your documents are read on your Mac and stay there, searches work offline after setup, and Shlexball only reads: it never changes, moves or deletes a file.
| mdfind | Shlexball | |
|---|---|---|
| Interface | Terminal | A search box |
| How it matches | Words and attributes in the Spotlight index | Meaning, via a local language model |
| Dates and file types | Query syntax: kMDItem attributes, $time functions | From how you phrase the request |
| Related words | No | Yes: shows what else it looked for |
| Shows the matching passage | No: paths only | Yes, on every card |
| Shows the command | You wrote it | Yes: Search details |
| Where it looks | The whole Mac, or -onlyin a folder | One folder you choose |
| Speed | Instant | A few seconds per search |
| Price | Built in | 30 free searches, then $9 a month or $59 a year |
mdfind is built in, instant, scriptable and pipes straight into other tools. It sees the whole Mac, supports live queries with -live, and never needs a model download. For scripts, automation and exact attribute queries it is the right tool. Shlexball is for the searches you would rather describe than write.
Pick a document you can describe but cannot name. Look for it with mdfind, then ask Shlexball. The first 30 searches are free and need no account.
▶ DOWNLOAD SHLEXBALLmacOS 15 or later. Apple silicon. 16 GB memory.