Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Interact with a running Obsidian vault via CLI to read, create, search notes, manage tasks/properties, and develop plugins.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: obsidian-cli3description: Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.4---56# Obsidian CLI78Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open.910## Command reference1112Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli1314## Syntax1516**Parameters** take a value with `=`. Quote values with spaces:1718```bash19obsidian create name="My Note" content="Hello world"20```2122**Flags** are boolean switches with no value:2324```bash25obsidian create name="My Note" silent overwrite26```2728For multiline content use `\n` for newline and `\t` for tab.2930## File targeting3132Many commands accept `file` or `path` to target a file. Without either, the active file is used.3334- `file=<name>` — resolves like a wikilink (name only, no path or extension needed)35- `path=<path>` — exact path from vault root, e.g. `folder/note.md`3637## Vault targeting3839Commands target the most recently focused vault by default. Use `vault=<name>` as the first parameter to target a specific vault:4041```bash42obsidian vault="My Vault" search query="test"43```4445## Common patterns4647```bash48obsidian read file="My Note"49obsidian create name="New Note" content="# Hello" template="Template" silent50obsidian append file="My Note" content="New line"51obsidian search query="search term" limit=1052obsidian daily:read53obsidian daily:append content="- [ ] New task"54obsidian property:set name="status" value="done" file="My Note"55obsidian tasks daily todo56obsidian tags sort=count counts57obsidian backlinks file="My Note"58```5960Use `--copy` on any command to copy output to clipboard. Use `silent` to prevent files from opening. Use `total` on list commands to get a count.6162## Plugin development6364### Develop/test cycle6566After making code changes to a plugin or theme, follow this workflow:67681. **Reload** the plugin to pick up changes:69```bash70obsidian plugin:reload id=my-plugin71```722. **Check for errors** — if errors appear, fix and repeat from step 1:73```bash74obsidian dev:errors75```763. **Verify visually** with a screenshot or DOM inspection:77```bash78obsidian dev:screenshot path=screenshot.png79obsidian dev:dom selector=".workspace-leaf" text80```814. **Check console output** for warnings or unexpected logs:82```bash83obsidian dev:console level=error84```8586### Additional developer commands8788Run JavaScript in the app context:8990```bash91obsidian eval code="app.vault.getFiles().length"92```9394Inspect CSS values:9596```bash97obsidian dev:css selector=".workspace-leaf" prop=background-color98```99100Toggle mobile emulation:101102```bash103obsidian dev:mobile on104```105106Run `obsidian help` to see additional developer commands including CDP and debugger controls.107