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
- 01
Update Obsidian first
The CLI ships with recent installers. If the setting below is missing, update the app before anything else.
- 02
Open Settings, then General
Turn on Command line interface.
- 03
Accept the registration prompt
Obsidian registers the
obsidiancommand with the shell. This is the step that makes the command exist in a terminal. - 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
obsidian helpThat 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.
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
openshows a note in the app, which is useful when a person is watching the screen.appendandprependwrite to any note without opening it.daily,daily:append,daily:readanddaily:pathwork on today's note directly, so the date never has to be computed.searchandsearch:contextfind text across the vault and can return JSON.backlinks,links,orphansanddeadendsare the graph checks. They answer whether a note is reachable.tasksandtagsturn 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.
{
"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.