CLI vault= parameter ignored — all commands resolve to the focused vault

Steps to reproduce

  1. Register and open 3 vaults (VaultA, VaultB, VaultC) at distinct paths
  2. Enable CLI in Settings → General
  3. Focus VaultA in the GUI
  4. Run: Obsidian vault vault=VaultB
  5. Run: Obsidian vault vault=VaultC

Did you follow the troubleshooting guide? [Y]

Expected result

Each command returns info for the specified vault (VaultB and VaultC respectively).

Actual result

Both commands return VaultA (the focused vault). The vault= parameter is ignored — all commands always operate on whichever vault has focus in the GUI. Obsidian vaults correctly lists all three.

Environment

SYSTEM INFO:
Obsidian version: 1.12.4
Installer version: 1.12.4
Operating system: Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:55 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8132 25.3.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none


Additional information

  • Reproduced with installer 1.11.7 (resolved to most recently opened vault) and 1.12.4 (resolves to focused vault). Vault parameter is ignored in both cases.
    • obsidian.json shows all three vaults registered with distinct paths and open: true.
    • Affects all CLI commands that accept vault=, not just vault — also files, search, read, etc.

I’m not entirely sure this is a bug :thinking:

I mean, it is mentioned, in the doc, that vault=

[ … ]. This must be the first parameter before your command

So, if you want to target a specific vault, you’re supposed to run:

% obsidian vault=VaultB vault 

Otherwise, yes, I think it falls back on the currently focused vault in Obsidian (GUI).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.