v1.0 — Now available for macOS · Press ⌘ Space to launch
← Back to blog

Why Spotlight is hostile to developers (and what to replace it with)

CmdSpace Team·

Spotlight was designed to find your photos, your Mail messages, and the occasional Numbers spreadsheet. It was not designed to coexist with a developer's home directory. After ten years of yearly macOS updates, that design mismatch has har…

Spotlight was designed to find your photos, your Mail messages, and the occasional Numbers spreadsheet. It was not designed to coexist with a developer's home directory. After ten years of yearly macOS updates, that design mismatch has hardened into outright hostility: Spotlight indexes folders it shouldn't, returns results developers don't want, and breaks in predictable ways every September.

If you write code on a Mac, Spotlight is silently costing you battery, disk life, and search precision every day. This post explains exactly how, and walks through what to replace it with — both for finding files and for the launcher role that ⌘Space currently fills.

The four ways Spotlight fights developers

1. It indexes node_modules, by default, forever

A modern web project has between 30,000 and 300,000 files in node_modules. Spotlight does not know this directory is disposable. On the first npm install after a fresh clone, mds_stores and mdworker_shared fire up and walk every file. CPU spikes, fans spin, battery drains.

You can confirm this on your own machine right now:

sudo fs_usage -w -f filesystem mdworker_shared | grep node_modules

Within seconds you will see reads against transpiled JavaScript that nothing on your machine will ever search for.

The "fix" Apple offers is manual: add the folder to System Settings → Spotlight → Search Privacy. This works exactly until you git clean -fdx and reinstall, at which point the exclusion may not survive the deletion-and-recreation cycle. There are also documented cases of exclusions silently disappearing after macOS updates, requiring you to re-add every dev folder annually.

2. It triggers indexing storms on git checkout

The HN and r/MacOS archives are full of reports of mdworker_shared consuming 200%+ CPU after a branch switch. The reason is mechanical: git checkout rewrites tens of thousands of files in a fraction of a second; Spotlight sees this as a flood of file-create events; the indexer queues them all. You burn a coffee break waiting for it to settle, or you sit through mds_stores thrashing the SSD in the background while you wonder why your build is slow.

The full mechanics and the safe long-term fix are documented in Why git checkout triggers a Spotlight storm. For now, accept that on a busy git repo Spotlight is actively making your machine slower.

3. Its results are wrong for code

Type a filename you know exists in your repo. Spotlight surfaces a Mail attachment from 2021, a Safari history entry, and an App Store suggestion. The actual file in your working tree, if it appears, is below the fold.

The reason is Spotlight's ranking. Apple tunes it for the median user, who searches for "tax 2023" or "wedding photos," not useEffect.test.ts. Spotlight upweights recency in personal data (Mail, Messages, Photos) and adds Siri Suggestions and App Store hits to fill the panel. None of that helps when you want to open a source file.

You can disable some of the noise in System Settings → Siri & Spotlight → Search Results (and via the disabled-by-default com.apple.lookup.shared plist tricks people post on the wikis), but you cannot reweight Spotlight to prefer your home directory over your inbox. The ranking is not yours to tune.

4. It breaks every September

Each annual macOS release ships a Spotlight regression. Sequoia had the mdworker battery-burn bug. Tahoe shipped the "no results until reindex" bug. The pattern is reliable enough that experienced developers now plan around it — delaying the upgrade by 3-6 weeks until the first dot release lands.

Apple's support page for "Spotlight not finding things after update" exists because it has been needed every year since 2018. The fix is always the same: mdutil -E /, wait several hours, hope. For a developer whose workflow lives in ⌘Space, that is several hours of friction every annual cycle.

What "replacing Spotlight" actually means

Spotlight does three jobs that look like one:

  1. Launcher — press ⌘Space, type an app name, hit Return.
  2. File search — press ⌘Space, type a file name, find it.
  3. Quick utility — calculator, dictionary lookups, unit conversions.

A developer-friendly replacement has to cover all three, and ideally adds the dev-specific commands (kill-by-port, run-script, open-pull-request) that Spotlight will never ship.

The launcher half

Three credible launchers in 2026:

  • CmdSpace — local-first, no account, ships kill-by-port and clipboard history out of the box. Built specifically for developers tired of Spotlight.
  • Raycast — large extension store, polished, requires an account for AI and sync features.
  • Alfred — paid Powerpack, scriptable workflows, no major version since 2022.

For a developer, the criteria are simple:

  • Sub-200ms cold open. ⌘Space must feel instant or you stop using it.
  • Indexes your code tree, ignores node_modules by default. This alone solves problem #1 above.
  • Scriptable. A launcher you cannot wire to kill-port, gh pr view, or tmux attach is not a developer launcher.
  • Local. Your daily commands should not be a network round-trip away from a remote endpoint.

CmdSpace is built to meet these four; Raycast meets three (the local one depends on which features you enable); Alfred meets all four if you buy the Powerpack and accept the lack of recent updates.

The file search half

Replacing Spotlight for file search is the underrated half. Most developers do not realize how much faster file search is when the index actually knows what you care about.

Options, ranked by setup cost:

  • Launcher with file search built in — CmdSpace, Raycast, and Alfred all do this. Their indexes are small (because they ignore the folders Spotlight insists on indexing) and the results are weighted by recency in your home and Documents, not your Mail.
  • mdfind from the terminal — Spotlight's CLI, sometimes faster than the GUI because it skips ranking. mdfind -onlyin ~/code 'kMDItemFSName=="*.test.ts"'.
  • fd — Rust file finder, respects .gitignore, screamingly fast. brew install fd, then fd useEffect.
  • ripgrep — for content search, not filename, but covers the case where you remember a string but not the file. rg "useEffect" ~/code.

For most developers, the right answer is: launcher for "I want to open this file," fd/rg for "I'm searching the codebase." Spotlight does neither well. Full breakdown in Searching files from the command line on macOS.

The utility half

Spotlight's calculator, dictionary, and unit conversions are genuinely useful. Every replacement launcher supports them. CmdSpace ships an inline calculator with significant digits; Raycast has a calculator extension; Alfred has had one for a decade. The full options for inline calculation are in Inline calculator on macOS: every option.

The migration: 15 minutes

Replacing Spotlight is not a deep refactor of your workflow. The migration is short:

  1. Install your replacement launcher. CmdSpace, Raycast, or Alfred.
  2. Take over ⌘Space. Either remap the system Spotlight shortcut to ⌥Space (System Settings → Keyboard → Keyboard Shortcuts → Spotlight) or disable Spotlight's shortcut entirely.
  3. Bind ⌘Space to your launcher. Every modern launcher offers this as a single-checkbox setup.
  4. Optionally, disable Spotlight indexing for your dev tree. sudo mdutil -i off /Volumes/Dev or use the safe per-folder method.
  5. Stop opening System Settings → Siri & Spotlight to tweak suggestions. You will not miss it.

The whole sequence takes 15 minutes. Day one feels weird because your fingers hit ⌘Space and a different surface opens. By day three the new launcher is the launcher. By day seven you have wired a custom command and forgotten Spotlight exists.

What you keep, what you lose

You keep:

  • Spotlight's web search alternatives. Your replacement launcher has them too, and you can choose your default engine.
  • Quick Look on Space. This is a Finder feature, not Spotlight, and survives the migration unchanged.
  • Mail and Messages search. These are still searchable inside the Mail and Messages apps via ⌘F.

You lose:

  • Spotlight's Siri Suggestions. Most developers consider this a feature.
  • Spotlight's App Store results. Ditto.
  • The annual September ritual of fixing Spotlight after an update.

What you gain is harder to summarize in a list: a ⌘Space that fits a developer's hands instead of fighting them. A launcher that knows kill-port is a thing. A search that returns the file you opened five minutes ago, not a 2021 email about it.

Try a developer launcher

CmdSpace was built exactly for the workflow described above: local-first, keyboard-only, with the dev commands you actually need wired in from the first launch. Free to try, no account, no remote sync to opt out of.

Spotlight will not get better for developers. It was not designed for us. The good news is that replacing it is one of the highest-ROI 15 minutes you can spend on your Mac this year.

Related reading