Add `this` object option for subcommand `base:query` of CLI

Use case or problem

When the bases filter items with this object, CLI will returns nothing by it can’t know which note to refer.

Proposed solution

  1. Add ref=<file> like subcommand task.
  2. Using current file as this object by default.

Emm…

Isn’t there anyone needs this? Or did I really miss out on any way to achieve a similar effect?

I encountered the same problem, addressed it on Discord with the following prompt:

Hi! I have an obsidian base with the following filter

note.applicationDate >= this.sinceDate

This base is placed in a note with frontmatter property sinceDate. The idea is to select notes with property applicationDate greater or equal to the property sinceDate in the note hosting the base. It works OK. Now, for automation/integration purposes, I’m trying to run this base query as Obsidian CLI and pass the JSON result to the next application.

 obsidian base:query file="Vacancies and applications.base" view="Applications since date" sinceDate="2026-08-01"

How can I possibly set this.sinceDate in the CLI command?

@ purple penguin kindly informed me that this feature request already exists.
So, yeah. That is needed for bases.

My use case adds one more possibility to the requested feature.
Use `ref=file` as suggested, or provide required frontmatter properties with `this.` parameters, in my case `this.sinceDate="2026-07-01"`.