Spotlight alternatives that search inside your files

The short answer

Start with what is already on your Mac: Finder search rules and mdfind in Terminal use the Spotlight index with more control. For exact words in many file types, ripgrep-all reads the files directly. To search photos, screenshots or a description, use an app that reads the files itself.

Finder search rules

  1. Open a Finder window and press ⌘ F. Click This Mac.
  2. Click + and build rules: Kind is PDF, Last opened date is within last 30 days, or Contents contains a word.
  3. Click Save to keep it as a Smart Folder, for example one per client or project.

mdfind in Terminal

mdfind asks the same index from the command line. It is handy in scripts and for searching one folder:

mdfind -onlyin ~/Documents "purchase order 4471"
mdfind "kMDItemKind == 'PDF document'" -onlyin ~/Downloads

It lists the files that contain every word, without ranking them.

ripgrep-all, for exact words in many file types

rga (ripgrep-all) is a free, open-source command-line tool. It reads the files directly, with no index, and finds exact words inside PDFs, Word files, e-books and archives. Install it with Homebrew, along with the two tools it uses to read PDFs and Word files, then search a folder:

brew install rga pandoc poppler
rga "purchase order" ~/Documents

It lists every match without ranking them, and it looks for the exact words you type.

For photos, screenshots and searching by description

Truffle reads your files on your Mac: the words in documents, the words in photos and screenshots, and what photos and videos show. You type what you remember, like “the receipt for the navy sofa”, and it shows why each file matched.

In our own benchmark on 10,000 files we generated and 572 questions, Truffle put the right file first 64.3% of the time. How we measured, and which other engines we ran on the same files.

Truffle finding IMG_2210.HEIC, a photo of a receipt, for “the receipt for the navy sofa”, because the receipt says “sofa, navy”.
The receipt is a photo, and Truffle read “sofa” and “navy” in it.

Free. Your files are searched on your own computer, not uploaded to us.

Apple, Mac, macOS, Finder and Spotlight are trademarks of Apple Inc., registered in the U.S. and other countries and regions. PageDuo is not affiliated with, endorsed or sponsored by Apple.