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

**URL:** <https://forum.obsidian.md/t/add-this-object-option-for-subcommand-base-query-of-cli/116814>\
**Category:** Feature requests\
**Tags:** cli, bases\
**Created:** [August 3, 2026, 5:58am UTC](https://forum.obsidian.md/t/add-this-object-option-for-subcommand-base-query-of-cli/116814 "2026-08-03T05:58:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lihsai0](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lihsai0](https://forum.obsidian.md/u/lihsai0)\
**Post date:** [August 3, 2026, 5:58am UTC](https://forum.obsidian.md/t/add-this-object-option-for-subcommand-base-query-of-cli/116814/1 "2026-08-03T05:58:23Z")

</div>

### 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.

---

<div class="post-metadata">

**Author:** ![lihsai0](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/l/7feea3/32.png) [@lihsai0](https://forum.obsidian.md/u/lihsai0)\
**Post date:** [August 7, 2026, 2:34am UTC](https://forum.obsidian.md/t/add-this-object-option-for-subcommand-base-query-of-cli/116814/2 "2026-08-07T02:34:33Z")

</div>

Emm…

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

---

<div class="post-metadata">

**Author:** ![voltel](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/v/ecb155/32.png) [@voltel](https://forum.obsidian.md/u/voltel)\
**Post date:** [September 3, 2026, 8:33pm UTC](https://forum.obsidian.md/t/add-this-object-option-for-subcommand-base-query-of-cli/116814/3 "2026-09-03T20:33:07Z")

</div>

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

Hi! I have an obsidian base with the following filter

```auto
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.

```auto
 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"`. `
