VERSUS MODE · ROUND 5

mdfind vs Shlexball

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

The short answer

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.

How mdfind works

mdfind ships with macOS and asks the Spotlight index directly. A few examples:

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.

What mdfind actually returns

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.

A query language is still keywords

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 writes the command for you

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.

Why local matters

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.

Side by side

mdfindShlexball
InterfaceTerminalA search box
How it matchesWords and attributes in the Spotlight indexMeaning, via a local language model
Dates and file typesQuery syntax: kMDItem attributes, $time functionsFrom how you phrase the request
Related wordsNoYes: shows what else it looked for
Shows the matching passageNo: paths onlyYes, on every card
Shows the commandYou wrote itYes: Search details
Where it looksThe whole Mac, or -onlyin a folderOne folder you choose
SpeedInstantA few seconds per search
PriceBuilt in30 free searches, then $9 a month or $59 a year

Where mdfind still wins

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.

Try the same search

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 SHLEXBALL

macOS 15 or later. Apple silicon. 16 GB memory.

All rounds