Skip to content
Seestack

Turn on the Obsidian CLI

Obsidian ships a command line interface. Turned on, the agent can open notes, search the vault and append to today's note without clicking coordinates or reading screenshots.

Enable it in Obsidian

  1. 01

    Update Obsidian first

    The CLI ships with recent installers. If the setting below is missing, update the app before anything else.

  2. 02

    Open Settings, then General

    Turn on Command line interface.

  3. 03

    Accept the registration prompt

    Obsidian registers the obsidian command with the shell. This is the step that makes the command exist in a terminal.

  4. 04

    Restart the terminal

    A shell that was already open will not see the new command. Quit it and open a new one.

Check that it works

terminal
obsidian help

That prints every command and its parameters. If Obsidian is not running, the first command starts it, so the first call can take a few seconds.

Syntax

The shape is the command, then parameter=value pairs, then bare flags. Values with spaces go in quotes, and vault=<name> goes first when more than one vault is open.

terminal
obsidian vault=ObsidianVault open path="Journal/Daily/2026/10/27.md"

obsidian append path="Journal/Daily/2026/10/27.md" \
         content="14:20 Created the docs section."

obsidian search query="map-before-mutating" limit=5

obsidian backlinks file="CLAUDE"

file or path, not both.

file= resolves a name the way a wikilink does. path= is exact, from the vault root. Use the path when two notes share a name.

The commands worth knowing

  • open shows a note in the app, which is useful when a person is watching the screen.
  • append and prepend write to any note without opening it.
  • daily, daily:append, daily:read and daily:path work on today's note directly, so the date never has to be computed.
  • search and search:context find text across the vault and can return JSON.
  • backlinks, links, orphans and deadends are the graph checks. They answer whether a note is reachable.
  • tasks and tags turn the vault into a queryable list instead of a pile of files.

Let the agent use it

The CLI is a shell command, so the agent calls it through Bash. One permission rule keeps it from asking every time.

~/.claude/settings.json
{
  "permissions": {
    "allow": ["Bash(obsidian *)"]
  }
}

That single rule is what makes the vault usable by an agent. Reading, searching and writing notes becomes the same operation, and the result is mirrored in the app as it happens.

If a command stalls

The CLI talks to the running app. Check that Obsidian is open and that the vault name matches the one in the command.