CLI search returns empty for multi-word heading text

Environment:

  • Obsidian 1.12.5 (app package), installer outdated
  • Windows 11 Pro
  • CLI accessed via bash (Claude Code / terminal)

Steps to reproduce:

  1. I have 85 notes containing the heading # Meeting Log
  2. obsidian search query="Meeting Log" → returns empty (no results, no error)
  3. obsidian search query="Meeting" → returns 10 results ✓
  4. obsidian search query="Log" → returns 3 results ✓
  5. obsidian search query="Visão Executiva" → returns 10 results ✓
  6. obsidian search query="Decisão Chave" → returns 10 results ✓

Expected: query="Meeting Log" should return files containing that
exact phrase, especially since both individual words return results.

Observations:

  • The text “Meeting Log” appears exclusively as a H1 heading (# Meeting Log)
  • Adding matches, format=json, limit=50, total, or case flags
    makes no difference
  • Grep confirms 85 files contain # Meeting Log

Question: Is there a known issue with CLI search and H1 headings
specifically?

In the app, searching for Meeting Log and "Meeting Log" have two different meaning.

If you use the CLI and are trying to do an exact string match, you should escape the extra pair of " needed.

obsidian search query="\"Meeting Log\""

Thanks for the suggestion — I tried both:

obsidian search query=“Meeting Log”
obsidian search query=““Meeting Log””

Both return empty. No error, no results.

I’m using Obsidian CLI integrated with Claude Code (AI coding assistant) via the official obsidian-cli skill. The main reason to use CLI over grep/file tools is to reduce token consumption — the Obsidian index should return targeted results without reading full files. But if basic search doesn’t work reliably, the token savings are lost because I have to fall back to grep anyway.

You need to escape the inner set of " like this \".

I am not sure what you are talking about here.

Put cloud code aside, open a terminal session and run the commands yourself and see the output.

I apologize if my previous message was unclear. I have implemented your suggestion, but the issue remains unresolved.

Did you try to update the installer (to 1.12.4 for the latest public release) ? :woman_shrugging:

I didn’t realize that I had to download the new version. I thought that updating through the app was the right way to do it.

Now, the simple command is working: obsidian search query=“Meeting Log”

The other solution returned no matches: obsidian search query="\"Meeting Log\""

Thanks for the help!

1 Like