| name | obsidian-cli |
| description | Interact with the running Obsidian vault via the `obsidian` CLI: read, create, append, search, rename, move notes; manage daily notes; list files and folders; set/read frontmatter properties; list tags. Auto-loads whenever the user wants to save content to Obsidian, take or capture a note, append to today's daily note, search the vault, look up or quote an existing vault note, or open a note in Obsidian — even when the user does not mention the CLI by name. Triggers include "save to Obsidian", "note this", "take a note", "add to today's note", "search my vault", "what did I write about X", "open in Obsidian", "rename this note", "Obsidianに保存", "メモして", "メモを取って", "メモに残して", "デイリーノートに追記", "今日のノートに追加", "vaultを検索", "Obsidianのノートを読んで", "Obsidianで開いて", "ノートをリネーム", or any request that names a vault file, a vault folder (e.g. `00_Inbox/`, `99_Tracking/Daily/`), a daily/weekly note, or a wikilink target. |
Obsidian CLI
Use the obsidian CLI to interact with a running Obsidian instance.
Prerequisites
Obsidian must be running. The CLI communicates with the active Obsidian app. If Obsidian is not open, all commands will fail.
Target vault: Main (default — no vault= needed in most cases).
Syntax
Parameters take a value with =. Quote values with spaces:
obsidian create name="My Note" content="Hello world"
Flags are boolean switches with no value:
obsidian create name="My Note" overwrite
File Targeting
file=<name> — resolves like a wikilink (name only, no path or extension)
path=<path> — exact path from vault root (e.g. folder/note.md)
When neither is given, the active file is used.
Content Escaping (Important)
When passing content to create, append, or prepend:
- Use
\n for newlines, \t for tabs (the CLI interprets these sequences)
- Escape
" inside the content string as \"
- Escape
$ as \$ to prevent shell variable expansion
- Backticks inside content should be escaped as
\`
- Content containing
! (e.g., Obsidian embedded links ![[file#heading]]) triggers bash history expansion, corrupting ! to \!. Prefix with set +H: set +H && obsidian create path="..." content="..." overwrite
Example — creating a note with frontmatter and body:
obsidian create path="00_Inbox/example.md" content="---\naliases:\ntags:\ndescription:\n---\n\n## Section\n\ncontent here" overwrite
Note Formatting Rules
When creating notes (obsidian create), follow the formatting rules defined in obsidian-notes:
- h1 → filename: If source content has
# Title, use it as the filename and remove from content
- Frontmatter: Always include empty
aliases:, tags:, description: fields — do NOT populate them
- Start from h2: Note body begins with
##, never #
Common Commands
obsidian read path="99_Tracking/Daily/2026-03-07.md"
obsidian read file="My Note"
obsidian create path="00_Inbox/note.md" content="..." overwrite
obsidian append path="00_Inbox/note.md" content="\n## New Section\n\ncontent"
obsidian search query="search term" limit=10
obsidian search:context query="term" limit=5
obsidian files folder="00_Inbox"
obsidian folders
obsidian open path="99_Tracking/Weekly/2026-W10.md"
obsidian rename path="00_Inbox/old.md" name="new-basename"
obsidian move path="00_Inbox/old.md" to="02_Notes/"
obsidian daily:read
obsidian daily:append content="- [ ] New task"
obsidian daily:path
obsidian property:set name="status" value="done" file="My Note"
obsidian property:read name="tags" file="My Note"
obsidian tags sort=count counts
obsidian vault
obsidian files total
Vault Directory Structure
| Directory | Purpose |
|---|
00_Inbox/ | Default destination for new files |
99_Tracking/Daily/ | Daily notes (YYYY-MM-DD.md) |
99_Tracking/Weekly/ | Weekly notes (YYYY-WNN.md) |
Full directory listing: see obsidian-notes.
Run obsidian help to see all available commands with full parameter documentation.