Use case or problem
My primary use case is integrating the Obsidian CLI (v1.8.0+) with AI Agents (such as LLMs using Tool-Use or Function Calling) and automated scripts.
Currently, the CLI returns human-readable, space-aligned text. For example, obsidian vault returns:
name Obsidian Vault
path C:\Users\admin\Documents\Obsidian Vault
files 529
folders 319
size 581586926
While this looks great for humans, it is problematic for AI Agents. These models often struggle to reliably parse unstructured text, especially when paths contain spaces or special characters. This leads to parsing hallucinations or errors, making the CLI difficult to use as a reliable “bridge” between an LLM and a local vault. As AI-powered Personal Knowledge Management (PKM) grows, the CLI is becoming the critical interface for these automated workflows.
Proposed solution
I propose adding a json literal as an optional argument to CLI commands to provide structured, machine-readable output. This aligns with Obsidian’s existing “keyword-based” CLI design rather than using traditional Unix-style flags.
Proposed Syntax:
obsidian [command] [sub-command] json
Example:
obsidian vault json
Proposed Output:
{
"name": "Obsidian Vault",
"path": "C:\\Users\\admin\\Documents\\Obsidian Vault",
"files": 529,
"folders": 319,
"size": 581586926
}
This would solve the problem by providing a stable, schema-first contract for developers and AI Agents. It would eliminate the need for fragile regex parsing and allow for reliable tool-chaining, where the output of one CLI command (like a list of files) can be safely passed as a structured input to another process. Supporting JSON would solidify Obsidian as the most “AI-ready” note-taking platform.