obsidian-cli
Skill0 starsChanged 42 days agoMITView on GitHub
Use this skill whenever the user wants to interact with their Obsidian vault from the command line or have an AI agent perform operations on notes, daily notes, properties, tags, tasks, links, bookmarks, templates, sync history, Bases, outlines, word count, random notes, unique notes, desktop navigation, or file recovery. Also supports Obsidian plugin and theme development with commands to reload plugins, inspect snippets, run JavaScript in app context, capture errors, take screenshots, inspect DOM and CSS, and toggle mobile emulation. Treat requests implying "go into my vault and do X" as an action trigger. Skip for pure conceptual questions about GUI navigation or settings.
84 other projects use a version of this.
Adopted by
Most recently taken up by
- Bruno-Cunha-Souza/ValarMindSkillstheir own version, first seen Nov 8, 2026
- levi-qiao/obsidian-llm-wikitheir own version, first seen Nov 8, 2026
- shkodnik1917/claude-brainlabtheir own version, first seen Nov 8, 2026
- LARi-UQAC/ResearchToolstheir own version, first seen Nov 5, 2026
- The-AIOS/aiostheir own version, first seen Nov 3, 2026
- vijaysuperpositionist/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use mermaid-visualizer, qmd and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
BCS1037Skillmermaid-visualizer
Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.
Also in 5 projects that use this
0xHoneyJarSkillqmd
Local markdown search engine for knowledge bases, notes, and documentation. Combines BM25 full-text search, vector semantic search, and LLM re-ranking. Use when searching through markdown notes, retrieving documents, or managing knowledge collections.
Also in 4 projects that use this
xfstudioSkillcode-review-excellence
Master effective code review practices to provide constructive feedback, catch bugs early, and foster knowledge sharing while maintaining team morale. Use when reviewing pull requests, establishing review standards, or mentoring developers.
Also in 3 projects that use this
MicrosoftSkillexcalidraw-diagram
Create Excalidraw diagram JSON files that make visual arguments. Use when the user wants to visualize workflows, architectures, or concepts.
Also in 5 projects that use this
RoundTable02Skilltutor
Interactive quiz tutor for Obsidian StudyVault learning. Use when the user wants to: (1) Take a diagnostic assessment of their knowledge, (2) Study or review specific sections/topics, (3) Drill weak areas identified in previous sessions, (4) Check their learning progress or dashboard, or says things like "quiz me", "test me", "let's study", "/tutor", "학습", "퀴즈", "평가".
Also in 4 projects that use this
LuisSambranoSkillfirecrawl
Deep web scraping, screenshots, PDF parsing, and website crawling using Firecrawl API
Also in 3 projects that use this
Other versions84 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 84
- kepano/obsidian-skills★ 49ksame name
- breferrari/obsidian-mind★ 5.4ksame name
- Atmosphere/atmosphere★ 3.8ksame name
- pedronauck/skills★ 649same name
- allenhutchison/obsidian-gemini★ 534same name
- sd0xdev/sd0x-dev-flow★ 192same name
- sd0xdev/sd0x-harness★ 192same name
- edrickleong/obsidian-calendar-bases★ 186same name
- benoror/obsidianos_work★ 166same name
- kv0906/pm-kit★ 138same name
74 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- defuddleSkill
- json-canvasSkill
- knapSkill
- obsidian-basesSkill
- obsidian-markdownSkill
- obsidian-mcpSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 5 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 75 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
If colon subcommands (property:set, daily:append, etc.) return exit 127, verify Obsidian.com exists.
- Very specific: line 80
Git Bash / MSYS2: If Bash resolves obsidian to Obsidian.exe instead of Obsidian.com, create a wrapper script at ~/bin/obsidian:
- Very specific: line 85
Headless Linux: Use the .deb package (not snap).
- Very specific: line 91
All parameters use key=value syntax.
- Distinctive: line 312
Follow this cycle when developing Obsidian plugins and themes:
- Distinctive: line 365
Follow the Read → Verify &rarr.
- Distinctive: line 372
Execute: Run the command.
- Distinctive: line 373
Confirm: Read the file back or check for errors.
- Distinctive: line 376
Identify: Search for the exact file to verify it exists and confirm the path.
- Very specific: line 377
Inspect: Check incoming backlinks (obsidian backlinks) to understand impact.
- Very specific: line 378
Confirm intent: Only use permanent deletion when the user explicitly requests it.
- Very specific: line 399
Vault-Relative Paths: Always specify paths relative to vault root (folder/note.md), never absolute OS paths.
- Very specific: line 403
template:insertconstraint: Only inserts into the currently open file in the GUI. - Very specific: line 430
Run obsidian vault to confirm CLI connectivity — it returns the vault name, path, and file count when working correctly.
“Common” is measured: kept by at least 6 in 10 of the 75 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Obsidian CLI
The official Obsidian CLI (v1.12+) enables comprehensive control of an Obsidian desktop instance from the command line over IPC. Requires Obsidian desktop to be running.
For exhaustive documentation on all 130+ commands, parameter tables, and output formats, refer to
references/command-reference.md.For known CLI silent failures, scope traps, and workarounds, refer to
references/reliability-rules.md.
Prerequisites
| Requirement | Details |
| Obsidian Desktop | v1.12.0+ |
| CLI enabled | Settings → Command line interface → Toggle ON |
| Obsidian running | The desktop application must be running (communicates over IPC) |
Platform-Specific Notes
- macOS / Linux: The
obsidianbinary is registered in yourPATHautomatically upon enabling CLI in Settings. - Windows: Requires the
Obsidian.comredirector file placed alongsideObsidian.exe. Must run with normal user privileges (admin terminals cause silent failures).- If colon subcommands (
property:set,daily:append, etc.) return exit127, verifyObsidian.comexists. If missing, reinstall the latest version from obsidian.md/download. - Git Bash / MSYS2: If Bash resolves
obsidiantoObsidian.exeinstead ofObsidian.com, create a wrapper script at~/bin/obsidian:#!/bin/bash /c/path/to/Obsidian.com "$@"
- If colon subcommands (
- Headless Linux: Use the
.debpackage (not snap). Run underxvfband prefix commands withDISPLAY=:5. EnsurePrivateTmp=falsein systemd services.
Syntax and Conventions
All parameters use key=value syntax. Quote values containing spaces.
obsidian <command> [subcommand] [key=value ...] [flags]File Targeting
Commands target files using one of two parameter styles (or the active file if omitted):
file="<name>": Resolves like a wikilink (note name without path or.mdextension).path="<path>": Exact vault-relative path (e.g.,projects/roadmap.md).
For multiline text content, use \n for newlines and \t for tabs.
Vault Targeting
Commands target the most recently active/focused vault by default. To target a specific vault:
- Flag method:
obsidian vault="My Vault" <command> ... - Positional method:
obsidian "My Vault" <command> ...
Command Overview (130+ Commands)
| Group | Key Commands | Purpose |
| Files | read, create, append, prepend, move, rename, delete, files, folders, file, random | Note CRUD and file discovery |
| Daily Notes | daily, daily:read, daily:append, daily:prepend, daily:path | Daily note operations |
| Search | search, search:context | Full-text search (format=json, matching line excerpts) |
| Properties | properties, property:read, property:set, property:remove, aliases | Frontmatter metadata management |
| Tags | tags, tag | Tag listing, occurrence counts, and filtering |
| Tasks | tasks, task | Task queries, filtering (todo, done, daily), and toggling |
| Links | backlinks, links, unresolved, orphans, deadends | Vault link and graph analysis |
| Bookmarks | bookmarks, bookmark | List and add bookmarks |
| Templates | templates, template:read, template:insert | Template management and insertion |
| Plugins | plugins, plugin, plugin:enable/disable/install/uninstall/reload, plugins:restrict | Community 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 querying and creation |
| History | history, history:list, history:read, history:restore | Local File Recovery snapshot management |
| Workspace | workspace, tabs, tab:open | Workspace layout and tab management |
| Diff | diff | Compare local vs sync file versions |
| Developer | eval, dev:screenshot, dev:debug, dev:console, dev:errors, dev:css, dev:dom, dev:mobile, devtools | Debugging, inspection, and test automation |
| Vault | vault, vaults, version, reload, restart, outline, wordcount, recents | App status and control |
Quick Reference — Common Operations
Reading and Writing Notes
# Read raw markdown
obsidian read path="folder/note.md"
obsidian read file="Meeting Note"
# Create a note — ALWAYS add 'silent' flag during agent operations
# Without 'silent', create opens the file in Obsidian's UI
obsidian create path="folder/new-note" content="# Title\n\nInitial text." silent
obsidian create path="projects/feature" template="project-template" silent overwrite
# Append and prepend content
obsidian append path="folder/note.md" content="New trailing content"
obsidian prepend path="folder/note.md" content="Content inserted after frontmatter"
# Move, rename, delete
obsidian move path="inbox/idea.md" to="archive/2026/idea.md"
obsidian delete path="scratch/temp.md" permanentDaily Notes
obsidian daily # Open today's note in UI
obsidian daily:read # Print today's note to stdout
obsidian daily:append content="- [ ] Follow up on PR #10"
obsidian daily:prepend content="## Morning Briefing"Search
obsidian search query="meeting" limit=10
obsidian search query="refactor" format=json matches # Preferred: structured JSON with line numbers
obsidian search:context query="TODO"Gotcha: Plain
search query="..."returns unstructured text. Always useformat=json matchesfor programmatic consumption — it returns[{"file":"path","matches":[{"line":N,"text":"..."}]}].
Properties and Tags
obsidian properties path="note.md" format=tsv # Use format=tsv for stable parsing
obsidian property:set path="note.md" name="status" value="in-progress"
obsidian property:read path="note.md" name="status"
obsidian property:remove path="note.md" name="draft"
obsidian tags all counts sort=count # MUST use 'all' for vault-wide tagsGotcha — properties:
format=jsononpropertiesreturns YAML-like output, not valid JSON. Useformat=tsvfor stable key-value parsing.Gotcha — tags:
tags countswithoutallreturns tags for the active file only (often empty). Always usetags all countsfor vault-wide results.
Tasks
obsidian tasks all # All vault-wide tasks (todo + done)
obsidian tasks all todo # Vault-wide incomplete tasks only
obsidian tasks daily todo # Incomplete tasks in today's daily note
obsidian task path="note.md" line=12 toggleGotcha — tasks scope:
tasksortasks todowithoutalldefaults to the active file scope (often nothing is active via CLI), returning 0 results silently. Always usetasks allfor vault-wide queries.
Bookmarks
obsidian bookmarks # List all saved bookmarks
obsidian bookmark file="folder/note.md" # Bookmark a note
obsidian bookmark file="folder/note.md" title="Custom" # Bookmark with custom title
obsidian bookmark file="folder/note.md" subpath="#H2" # Bookmark specific heading
obsidian bookmark search="query text" title="Saved" # Bookmark a search queryOutline & Document Structure
obsidian outline path="projects/roadmap.md" # Heading hierarchy
obsidian outline path="projects/roadmap.md" format=json # Structured heading tree with line offsetsAliases
obsidian aliases path="notes/concept.md" # Note aliases from frontmatter
obsidian aliases # Vault-wide alias lookup tableTemplates & Dynamic Variables
obsidian templates # List available template files
obsidian template:read name="meeting-notes" # Read template raw text
obsidian template:read name="meeting-notes" resolve title="Design Review" # Resolve {{title}}, {{date}}, {{time}}
obsidian create path="meetings/review" template="meeting-notes" silent # Create note from templateGotcha — templates:
template:insertinserts into whichever file is currently active in the Obsidian desktop UI window and fails if no note is open. Useobsidian create path="..." template="..." silentfor robust programmatic creation.
Word Count & Document Metrics
obsidian wordcount path="notes/article.md" # Words, characters, sentences, and reading timeRandom & Unique Notes
obsidian random:read # Read content of random note to stdout
obsidian random:read folder="quotes" # Scoped to folder
obsidian random # Open random note in UI
obsidian unique title="Core Concept" # Create timestamped Zettelkasten noteDesktop Navigation & Open
obsidian open path="projects/roadmap.md" # Focus/open note in Obsidian UI
obsidian open path="projects/roadmap.md" newtab # Open note in a new tabObsidian Commands & Hotkeys
obsidian commands # List all command IDs
obsidian commands filter="theme" # Filter command palette IDs
obsidian command id="app:toggle-left-sidebar" # Trigger command by ID
obsidian hotkeys # Inspect assigned keybindingsCSS Snippets
obsidian snippets # List installed CSS snippets
obsidian snippets:enabled # List enabled snippets
obsidian snippet:enable name="card-view" # Enable snippet
obsidian snippet:disable name="card-view" # Disable snippetObsidian Bases
obsidian bases # List all .base files in vault
obsidian base:query file="tasks" format=json # Query database records as JSON
obsidian base:query path="data/tasks.base" view="Table" # Query specific view
obsidian base:views file="tasks" # List views defined in baseFile Recovery & History Snapshots
obsidian history:list # List files with local snapshots
obsidian history path="notes/draft.md" # List snapshot timestamps
obsidian history:read path="notes/draft.md" version=2 # Read previous snapshot
obsidian history:restore path="notes/draft.md" version=2 # Restore snapshot versionObsidian Sync
obsidian sync:status # Current sync engine state
obsidian sync:history path="notes/draft.md" # Remote version history
obsidian sync:deleted # List files deleted via syncPlugin and Theme Development Workflow
Follow this cycle when developing Obsidian plugins and themes:
- Reload changes:
obsidian plugin:reload id="my-plugin-id" - Check for runtime errors:
obsidian dev:errors - Inspect DOM and CSS:
obsidian dev:dom selector=".workspace-leaf" text obsidian dev:css selector=".workspace-leaf" prop=background-color - Capture visual screenshot:
obsidian dev:screenshot path="tests/screenshot.png" - Inspect console output:
obsidian dev:debug on obsidian dev:console level=error limit=20 - Execute JavaScript in app context:
obsidian eval code="app.vault.getMarkdownFiles().length" - Toggle mobile emulation:
obsidian dev:mobile on
TUI Mode
Running obsidian with no arguments opens an interactive terminal interface:
| Key | Action |
↑ / ↓ | Navigate file list |
Enter | Open file in Obsidian |
/ | Search vault |
n | Create new note |
d | Delete note |
r | Rename note |
q | Exit TUI |
Safety Policy for Vault Operations
Follow the Read → Verify → Execute → Confirm pattern for all operations that modify vault state.
Non-Destructive Operations (Read, Search, List)
Execute directly. No confirmation needed.
Additive Operations (Create, Append, Prepend)
- Verify target: Confirm the file path or daily note exists (or should be created).
- Execute: Run the command.
- Confirm: Read the file back or check for errors.
Destructive Operations (Delete, Move, Rename, Overwrite)
- Identify: Search for the exact file to verify it exists and confirm the path.
- Inspect: Check incoming backlinks (
obsidian backlinks) to understand impact. - Confirm intent: Only use
permanentdeletion when the user explicitly requests it. Default to trash. - Execute: Run the command.
- Verify: Confirm the operation completed (e.g., file no longer at original path, file exists at new path).
# Example: Safe delete workflow
obsidian file path="scratch/temp.md" # 1. Verify file exists
obsidian backlinks file="scratch/temp.md" # 2. Check incoming links
obsidian delete path="scratch/temp.md" # 3. Execute (trash, not permanent)
obsidian file path="scratch/temp.md" # 4. Confirm removalProperty Modification
- Read current value:
obsidian property:read path="note.md" name="status" - Set new value:
obsidian property:set path="note.md" name="status" value="done" - Verify:
obsidian property:read path="note.md" name="status"
Important Rules and Tips
- Vault-Relative Paths: Always specify paths relative to vault root (
folder/note.md), never absolute OS paths. createvsmoveextension behavior:create path="folder/note"omits.md(appended automatically).move path="old.md" to="new.md"requires the full destination path with.md.
template:insertconstraint: Only inserts into the currently open file in the GUI. To create a new file headlessly from a template, useobsidian create path="path/name" template="template-name".property:setlists:value="a, b"stores a string. To store native YAML array lists, modify the note's frontmatter directly or useobsidian eval.- Multiline
eval: Inline multiline JS may cause parsing errors. For multiline logic, write to a script file and pass its content:obsidian eval code="$(cat script.js)" - Pipe-friendly: Combine commands cleanly with Unix tools (
grep,jq,sed,awk).
Troubleshooting Guide
| Problem | Root Cause | Solution |
| Empty output / command hangs | Obsidian is closed, or run from an Admin terminal on Windows | Ensure Obsidian is open; run from a standard-privilege terminal |
command not found: obsidian | CLI path not registered in shell environment | Toggle CLI OFF then ON in Obsidian Settings; restart terminal |
Exit code 127 on colon commands | Missing Obsidian.com or Git Bash resolving .exe | Reinstall Obsidian v1.12+; on Git Bash, use an Obsidian.com wrapper script |
| Socket error / IPC failure on Linux | Systemd service isolation (PrivateTmp=true) or Snap | Set PrivateTmp=false in systemd unit; install official .deb package |
| Headless Linux display error | No X server running | Run under xvfb-run or export DISPLAY=:5 |
Command "[Vault Name]" not found | Shell argument parsing variation | Use vault="[Vault Name]" flag or switch to the vault in GUI |
Error message but $? = 0 | CLI returns exit code 0 even on some failures | Never rely solely on exit codes. Always parse stdout for Error: prefixes to detect actual failures |
| Tags/tasks return empty | Scope defaults to active file (nothing active in CLI mode) | Always use tags all and tasks all for vault-wide operations |
Fallback Strategy
If the Obsidian CLI is unavailable (app not running, CLI not installed, or version too old), fall back to direct file system tools (Read, Write, Edit, Grep, Glob) for basic operations. The CLI is required only when Obsidian's index or app features add value (search, backlinks, tags, tasks, properties, bases). Plain text manipulation can always use file tools directly.
Run obsidian vault to confirm CLI connectivity — it returns the vault name, path, and file count when working correctly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

