Obsidian CLI
Use the CLI as an adapter to a running Obsidian application when its index or application state is the relevant source of truth.
Select the interface
- Use filesystem tools for ordinary file inspection and exact Markdown or YAML edits.
- Use the CLI when Obsidian-resolved links or properties, Bases, or running application state are the relevant source of truth.
- Use
moveorrenamewhen an approved operation must update Obsidian-managed internal links.
Run commands
- Run
obsidian help <command>before relying on remembered syntax. - Pass parameters as
key=value, quote values containing spaces, and pass boolean flags without a value. - Use
file=<name>for Obsidian-style name resolution andpath=<vault-relative-path>for an exact target. - Put
vault=<name>first when the intended vault is not unambiguous. - Resolve mutation targets with read-only commands before changing them.
- Treat
evalas potentially mutating even when the JavaScript appears observational.
Verify mutations
- Query the resulting state through Obsidian when indexed behavior matters.
- Inspect the affected files for unexpected filesystem changes.
- Report any application behavior that was not verified in the current environment.