Obsidian CLI
The official Obsidian CLI (v1.12+) controls Obsidian from the terminal via IPC with a running desktop instance.
Read references/command-reference.md for specific flags, output formats, or
subcommands. It covers all 130+ commands with full parameter tables.
Prerequisites
| Requirement |
Details |
| Obsidian Desktop |
v1.12.0+ |
| CLI enabled |
Settings, Command line interface, Toggle ON |
| Obsidian running |
Desktop app must be running for CLI to work (IPC) |
Syntax
All parameters use key=value syntax. Quote values containing spaces.
obsidian <command> [subcommand] [key=value ...] [flags]
Multi-Vault
Target a specific vault by making it the first argument:
obsidian "My Vault" daily:read
obsidian "Work Notes" search query="meeting"
If omitted, the CLI targets the most recently active vault.
Command Overview
The CLI provides 130+ commands across these groups:
| Group |
Key Commands |
Purpose |
| files |
read, create, append, prepend, move, rename, delete, files, folders, file, random |
Note CRUD and file discovery |
| daily |
daily, daily:read, daily:append, daily:prepend, daily:path |
Daily note operations |
| search |
search, search:context |
Full-text search; search:context returns matching lines |
| properties |
properties, property:read, property:set, property:remove, aliases |
Frontmatter/metadata management |
| tags |
tags, tag |
Tag listing, counts, and filtering |
| tasks |
tasks, task |
Task querying, filtering, and toggling |
| links |
backlinks, links, unresolved, orphans, deadends |
Graph and link analysis |
| bookmarks |
bookmarks, bookmark |
List and add bookmarks |
| templates |
templates, template:read, template:insert |
Template listing, rendering, insertion |
| plugins |
plugins, plugin, plugin:enable, plugin:disable, plugin:install, plugin:uninstall, plugins:restrict |
Plugin management |
| sync |
sync, sync:status, sync:history, sync:read, sync:restore, sync:deleted |
Obsidian Sync operations |
| themes |
themes, theme, theme:set, theme:install, theme:uninstall |
Theme management |
| snippets |
snippets, snippets:enabled, snippet:enable, snippet:disable |
CSS snippet management |
| commands |
commands, command, hotkeys, hotkey |
Execute Obsidian commands by ID; inspect hotkeys |
| bases |
bases, base:query, base:views, base:create |
Obsidian Bases (v1.12+ database feature) |
| history |
history, history:list, history:read, history:restore |
File version recovery (File Recovery plugin) |
| workspace |
workspace, tabs, tab:open |
Workspace layout and tab management |
| diff |
diff |
Compare local vs sync file versions |
| dev |
eval, dev:screenshot, dev:debug, dev:console, dev:errors, dev:css, dev:dom, devtools |
Developer/debugging tools |
| vault |
vault, vaults, version, reload, restart |
Vault info and app control |
| other |
outline, wordcount, recents |
Utility commands |
Quick Reference
Reading and Writing Notes
obsidian read path="folder/note.md"
obsidian create path="folder/note" content="# New Note"
obsidian create path="folder/note" template="meeting-notes"
obsidian append path="folder/note.md" content="New paragraph"
obsidian prepend path="folder/note.md" content="Top content"
obsidian move path="old/note.md" to="new/note.md"
obsidian delete path="folder/note.md"
obsidian delete path="folder/note.md" permanent
Daily Notes
obsidian daily # Open today's daily note
obsidian daily:read # Print content of today's note
obsidian daily:append content="- [ ] New task"
obsidian daily:prepend content="## Morning Notes"
Search
obsidian search query="project alpha"
obsidian search query="TODO" path="projects" limit=10
obsidian search query="meeting" format=json
obsidian search query="urgent" case
Properties and Tags
obsidian properties path="note.md"
obsidian property:set path="note.md" name="status" value="active"
obsidian property:read path="note.md" name="status"
obsidian property:remove path="note.md" name="draft"
obsidian tags counts sort=count
obsidian tag name="project/alpha"
Tasks
obsidian tasks # All tasks
obsidian tasks all # All tasks
obsidian tasks done # Completed only
obsidian tasks daily # Tasks in today's daily note
obsidian task path="note.md" line=12 toggle
obsidian tasks | grep "\[ \]" # Filter to incomplete only
Developer and Automation
obsidian eval code="app.vault.getFiles().length"
obsidian dev:screenshot path="folder/screenshot.png"
obsidian dev:debug on
obsidian dev:console limit=20
obsidian dev:errors
TUI Mode
Running obsidian with no arguments launches an interactive TUI.
Common Agent Patterns
Daily Journal Automation
obsidian daily:append content="## $(date '+%H:%M') -- Status Update
- Completed: feature branch merge
- Next: code review for PR #42
- Blocked: waiting on API credentials"
Create Note from Template with Metadata
obsidian create path="projects/new-feature" template="project-template"
obsidian property:set path="projects/new-feature.md" name="status" value="planning"
obsidian property:set path="projects/new-feature.md" name="created" value="$(date -I)"
obsidian daily:append content="- Started [[projects/new-feature|New Feature]]"
Vault Analytics
obsidian files total # Total file count
obsidian tags counts sort=count # Most used tags
obsidian tasks | grep "\[ \]" # Incomplete tasks across vault
obsidian orphans # Notes needing integration
obsidian unresolved # Broken links to fix
Search and Extract
obsidian search query="meeting notes" format=json | jq '.[]'
obsidian read path="meetings/standup.md" | grep "Action item"
Sync Management
obsidian sync:status # Check sync health
obsidian sync:history path="important.md"
obsidian sync:restore path="important.md" version=3
Execute Obsidian Commands
obsidian commands | grep "graph"
obsidian command id="graph:open"
obsidian command id="app:open-settings"
Direct File Editing
obsidian vault returns the filesystem path of the active vault. Use this path with Read, Edit, and Write tools to modify markdown files directly instead of delete/recreate cycles through the CLI.
obsidian vault # returns: path /Users/.../ObsidianVault/MCG
Frontmatter (properties, tags, dates) is plain YAML between --- fences. No special format. Default frontmatter for new notes:
---
tags:
- topic-a
- topic-b
created: 2026-04-14
---
Tags should be lowercase, hyphenated. Created date is ISO 8601 (YYYY-MM-DD). Read/Edit/Write handles everything including metadata. Use the CLI for search, vault operations, and commands that interact with the Obsidian app (sync, plugins, templates, eval).
Tips
- Paths are vault-relative. Use
folder/note.md, not absolute filesystem paths.
create paths omit .md. The extension is added automatically.
move requires full target path including .md extension.
- Plain text output works with
grep, awk, sed, jq.
- Use
format=json on search for JSON array of file paths.
daily:prepend inserts content after frontmatter, not at byte 0.
- Use
eval to run arbitrary JavaScript against the Obsidian API (app.*).
template:insert inserts into the currently active file in the Obsidian UI. To create a file from a template via CLI, use obsidian create path="..." template="...".
property:set stores list values as strings. For proper array fields, edit frontmatter directly or use eval.
eval requires single-line JavaScript. For multiline, write to a temp file first.
- Multi-vault targeting may not work in all environments. If vault name fails, omit it and switch vaults manually in Obsidian UI.
1---2name: obsidian3description: Obsidian vault operations using the obsidian cli4---56# Obsidian CLI78The official Obsidian CLI (v1.12+) controls Obsidian from the terminal via IPC with a running desktop instance.910> Read `references/command-reference.md` for specific flags, output formats, or11> subcommands. It covers all 130+ commands with full parameter tables.1213## Prerequisites1415| Requirement | Details |16| ---------------- | ------------------------------------------------- |17| Obsidian Desktop | v1.12.0+ |18| CLI enabled | Settings, Command line interface, Toggle ON |19| Obsidian running | Desktop app must be running for CLI to work (IPC) |2021## Syntax2223All parameters use `key=value` syntax. Quote values containing spaces.2425```bash26obsidian <command> [subcommand] [key=value ...] [flags]27```2829### Multi-Vault3031Target a specific vault by making it the first argument:3233```bash34obsidian "My Vault" daily:read35obsidian "Work Notes" search query="meeting"36```3738If omitted, the CLI targets the most recently active vault.3940## Command Overview4142The CLI provides 130+ commands across these groups:4344| Group | Key Commands | Purpose |45| ---------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |46| files | `read`, `create`, `append`, `prepend`, `move`, `rename`, `delete`, `files`, `folders`, `file`, `random` | Note CRUD and file discovery |47| daily | `daily`, `daily:read`, `daily:append`, `daily:prepend`, `daily:path` | Daily note operations |48| search | `search`, `search:context` | Full-text search; `search:context` returns matching lines |49| properties | `properties`, `property:read`, `property:set`, `property:remove`, `aliases` | Frontmatter/metadata management |50| tags | `tags`, `tag` | Tag listing, counts, and filtering |51| tasks | `tasks`, `task` | Task querying, filtering, and toggling |52| links | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` | Graph and link analysis |53| bookmarks | `bookmarks`, `bookmark` | List and add bookmarks |54| templates | `templates`, `template:read`, `template:insert` | Template listing, rendering, insertion |55| plugins | `plugins`, `plugin`, `plugin:enable`, `plugin:disable`, `plugin:install`, `plugin:uninstall`, `plugins:restrict` | Plugin management |56| sync | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` | Obsidian Sync operations |57| themes | `themes`, `theme`, `theme:set`, `theme:install`, `theme:uninstall` | Theme management |58| snippets | `snippets`, `snippets:enabled`, `snippet:enable`, `snippet:disable` | CSS snippet management |59| commands | `commands`, `command`, `hotkeys`, `hotkey` | Execute Obsidian commands by ID; inspect hotkeys |60| bases | `bases`, `base:query`, `base:views`, `base:create` | Obsidian Bases (v1.12+ database feature) |61| history | `history`, `history:list`, `history:read`, `history:restore` | File version recovery (File Recovery plugin) |62| workspace | `workspace`, `tabs`, `tab:open` | Workspace layout and tab management |63| diff | `diff` | Compare local vs sync file versions |64| dev | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `devtools` | Developer/debugging tools |65| vault | `vault`, `vaults`, `version`, `reload`, `restart` | Vault info and app control |66| other | `outline`, `wordcount`, `recents` | Utility commands |6768## Quick Reference6970### Reading and Writing Notes7172```bash73obsidian read path="folder/note.md"74obsidian create path="folder/note" content="# New Note"75obsidian create path="folder/note" template="meeting-notes"76obsidian append path="folder/note.md" content="New paragraph"77obsidian prepend path="folder/note.md" content="Top content"78obsidian move path="old/note.md" to="new/note.md"79obsidian delete path="folder/note.md"80obsidian delete path="folder/note.md" permanent81```8283### Daily Notes8485```bash86obsidian daily # Open today's daily note87obsidian daily:read # Print content of today's note88obsidian daily:append content="- [ ] New task"89obsidian daily:prepend content="## Morning Notes"90```9192### Search9394```bash95obsidian search query="project alpha"96obsidian search query="TODO" path="projects" limit=1097obsidian search query="meeting" format=json98obsidian search query="urgent" case99```100101### Properties and Tags102103```bash104obsidian properties path="note.md"105obsidian property:set path="note.md" name="status" value="active"106obsidian property:read path="note.md" name="status"107obsidian property:remove path="note.md" name="draft"108obsidian tags counts sort=count109obsidian tag name="project/alpha"110```111112### Tasks113114```bash115obsidian tasks # All tasks116obsidian tasks all # All tasks117obsidian tasks done # Completed only118obsidian tasks daily # Tasks in today's daily note119obsidian task path="note.md" line=12 toggle120obsidian tasks | grep "\[ \]" # Filter to incomplete only121```122123### Developer and Automation124125```bash126obsidian eval code="app.vault.getFiles().length"127obsidian dev:screenshot path="folder/screenshot.png"128obsidian dev:debug on129obsidian dev:console limit=20130obsidian dev:errors131```132133## TUI Mode134135Running `obsidian` with no arguments launches an interactive TUI.136137## Common Agent Patterns138139### Daily Journal Automation140141```bash142obsidian daily:append content="## $(date '+%H:%M') -- Status Update143- Completed: feature branch merge144- Next: code review for PR #42145- Blocked: waiting on API credentials"146```147148### Create Note from Template with Metadata149150```bash151obsidian create path="projects/new-feature" template="project-template"152obsidian property:set path="projects/new-feature.md" name="status" value="planning"153obsidian property:set path="projects/new-feature.md" name="created" value="$(date -I)"154obsidian daily:append content="- Started [[projects/new-feature|New Feature]]"155```156157### Vault Analytics158159```bash160obsidian files total # Total file count161obsidian tags counts sort=count # Most used tags162obsidian tasks | grep "\[ \]" # Incomplete tasks across vault163obsidian orphans # Notes needing integration164obsidian unresolved # Broken links to fix165```166167### Search and Extract168169```bash170obsidian search query="meeting notes" format=json | jq '.[]'171obsidian read path="meetings/standup.md" | grep "Action item"172```173174### Sync Management175176```bash177obsidian sync:status # Check sync health178obsidian sync:history path="important.md"179obsidian sync:restore path="important.md" version=3180```181182### Execute Obsidian Commands183184```bash185obsidian commands | grep "graph"186obsidian command id="graph:open"187obsidian command id="app:open-settings"188```189190## Direct File Editing191192`obsidian vault` returns the filesystem path of the active vault. Use this path with Read, Edit, and Write tools to modify markdown files directly instead of delete/recreate cycles through the CLI.193194```bash195obsidian vault # returns: path /Users/.../ObsidianVault/MCG196```197198Frontmatter (properties, tags, dates) is plain YAML between `---` fences. No special format. Default frontmatter for new notes:199200```yaml201---202tags:203 - topic-a204 - topic-b205created: 2026-04-14206---207```208209Tags should be lowercase, hyphenated. Created date is ISO 8601 (YYYY-MM-DD). Read/Edit/Write handles everything including metadata. Use the CLI for search, vault operations, and commands that interact with the Obsidian app (sync, plugins, templates, eval).210211## Tips2122131. Paths are vault-relative. Use `folder/note.md`, not absolute filesystem paths.2142. `create` paths omit `.md`. The extension is added automatically.2153. `move` requires full target path including `.md` extension.2164. Plain text output works with `grep`, `awk`, `sed`, `jq`.2175. Use `format=json` on `search` for JSON array of file paths.2186. `daily:prepend` inserts content after frontmatter, not at byte 0.2197. Use `eval` to run arbitrary JavaScript against the Obsidian API (`app.*`).2208. `template:insert` inserts into the currently active file in the Obsidian UI. To create a file from a template via CLI, use `obsidian create path="..." template="..."`.2219. `property:set` stores list values as strings. For proper array fields, edit frontmatter directly or use `eval`.22210. `eval` requires single-line JavaScript. For multiline, write to a temp file first.22311. Multi-vault targeting may not work in all environments. If vault name fails, omit it and switch vaults manually in Obsidian UI.