$npx -y skills add kv0906/pm-kit --skill obsidian-cliControl Obsidian from the terminal using the obsidian CLI. Use when the agent needs to open notes, search the vault inside Obsidian, append/prepend content to the active file, create notes from templates, manage properties, check backlinks/orphans, query Bases, or interact with
| 1 | # Obsidian CLI Skill |
| 2 | |
| 3 | Control the running Obsidian app from the terminal. Supplementary tool alongside Read/Write/Edit, Glob, Grep, QMD, and Neo4j. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | - Obsidian 1.12+ running (early access, Catalyst license) |
| 8 | - CLI registered: Settings > General > Command line interface |
| 9 | - Templates plugin: Settings > Core Plugins > Templates > Template folder → `_templates` |
| 10 | - PATH: `/Applications/Obsidian.app/Contents/MacOS` (in `~/.zprofile`) |
| 11 | |
| 12 | ## Important: Noisy Output |
| 13 | |
| 14 | The CLI outputs `Loading updated app package...` to stdout on every invocation. **Always filter with `grep -v`**: |
| 15 | |
| 16 | ```bash |
| 17 | obsidian orphans total 2>/dev/null | grep -v "Loading updated" # correct — clean output |
| 18 | obsidian orphans total # noisy output in agent context |
| 19 | ``` |
| 20 | |
| 21 | Shorthand for all examples below: `2>/dev/null | grep -v "Loading updated"` is abbreviated as `2>/dev/null` for readability, but always include the full filter in practice. |
| 22 | |
| 23 | ## When to Use CLI vs File Tools |
| 24 | |
| 25 | | Scenario | Use CLI | Use File Tools | |
| 26 | |----------|---------|----------------| |
| 27 | | Open a note in Obsidian UI | `obsidian open` | No equivalent | |
| 28 | | Read/write file content | Either works | **Prefer Read/Write/Edit** | |
| 29 | | Search vault content | `obsidian search` | **Prefer Grep/QMD** | |
| 30 | | Open today's daily note in Obsidian | `obsidian daily` | No equivalent | |
| 31 | | Append task to daily note | `obsidian daily:append` | Either | |
| 32 | | Create note from template | `obsidian create template=X` | Manual template apply | |
| 33 | | Check backlinks/orphans/unresolved | `obsidian backlinks/orphans` | Manual grep | |
| 34 | | Set/read properties (frontmatter) | `obsidian property:set` | Edit tool | |
| 35 | | Query a Base view | `obsidian base:query` | No equivalent | |
| 36 | | Execute Obsidian commands | `obsidian command` | No equivalent | |
| 37 | |
| 38 | **Rule of thumb**: CLI for Obsidian-app-specific actions (open files, trigger commands, query Bases, graph relationships). File tools for direct file manipulation. |
| 39 | |
| 40 | ## Agent Integration Patterns |
| 41 | |
| 42 | ### Keeper — Supplementary Health Checks |
| 43 | |
| 44 | ```bash |
| 45 | # Quick vault health stats (supplement Python/Neo4j checks) |
| 46 | obsidian unresolved verbose 2>/dev/null | grep -v "Loading updated" |
| 47 | obsidian orphans total 2>/dev/null | grep -v "Loading updated" |
| 48 | obsidian deadends total 2>/dev/null | grep -v "Loading updated" |
| 49 | ``` |
| 50 | |
| 51 | ### Scribe — Quick Capture |
| 52 | |
| 53 | ```bash |
| 54 | # Fast append to daily note (no file path needed) |
| 55 | obsidian daily:append content="- [ ] Review TPM progress" silent 2>/dev/null |
| 56 | |
| 57 | # Atomic frontmatter update |
| 58 | obsidian property:set name=status value=shipped path="prd/xmarket/checkout.md" 2>/dev/null |
| 59 | |
| 60 | # Template-based note creation |
| 61 | obsidian create name="New PRD" template=prd silent 2>/dev/null |
| 62 | |
| 63 | # Surface created note in Obsidian |
| 64 | obsidian open path="decisions/xmarket/2026-02-11-payment-provider.md" newtab 2>/dev/null |
| 65 | ``` |
| 66 | |
| 67 | ### Scout — Fallback Search |
| 68 | |
| 69 | ```bash |
| 70 | # Backlinks via Obsidian's graph (alternative to Neo4j) |
| 71 | obsidian backlinks file=Note 2>/dev/null |
| 72 | |
| 73 | # Quick text search (alternative to QMD) |
| 74 | obsidian search query="payment provider" 2>/dev/null |
| 75 | ``` |
| 76 | |
| 77 | ### Today — Workflow Touchpoints |
| 78 | |
| 79 | ```bash |
| 80 | # Phase 0: Ensure daily note visible in Obsidian |
| 81 | obsidian daily silent 2>/dev/null |
| 82 | |
| 83 | # Phase 3: Quick health stats |
| 84 | obsidian unresolved total 2>/dev/null |
| 85 | obsidian orphans total 2>/dev/null |
| 86 | |
| 87 | # Phase 5: Surface daily note |
| 88 | obsidian open path="daily/2026-02-11.md" 2>/dev/null |
| 89 | ``` |
| 90 | |
| 91 | ## Command Reference |
| 92 | |
| 93 | ### Vault & File Targeting |
| 94 | |
| 95 | ```bash |
| 96 | # Auto-detects vault from CWD |
| 97 | obsidian daily 2>/dev/null |
| 98 | |
| 99 | # Target specific vault |
| 100 | obsidian vault=Notes daily 2>/dev/null |
| 101 | |
| 102 | # By name (wikilink resolution) |
| 103 | obsidian read file=Recipe 2>/dev/null |
| 104 | |
| 105 | # By exact path |
| 106 | obsidian read path="prd/xmarket/checkout.md" 2>/dev/null |
| 107 | ``` |
| 108 | |
| 109 | ### Daily Notes |
| 110 | |
| 111 | ```bash |
| 112 | obsidian daily 2>/dev/null # Open today's daily note |
| 113 | obsidian daily:read 2>/dev/null # Read daily note contents |
| 114 | obsidian daily:append content="- [ ] Task" 2>/dev/null # Append to daily note |
| 115 | obsidian daily:prepend content="## Morning" 2>/dev/null # Prepend after frontmatter |
| 116 | obsidian daily:append content="text" silent 2>/dev/null # Append without opening |
| 117 | ``` |
| 118 | |
| 119 | ### Files & Folders |
| 120 | |
| 121 | ```bash |
| 122 | obsidian files 2>/dev/null # List all files |
| 123 | obsidian files folder=prd 2>/dev/null # List files in folder |
| 124 | obsidian files ext=md total 2>/dev/null # Count .md files |
| 125 | obsidian open file=Note 2>/dev/null # Open a file |
| 126 | obsidian open file=Note newtab 2>/dev/null # Open in new tab |
| 127 | obsidian create name="New Note" 2>/dev/null # Create file |
| 128 | obsidian create name=Note template=prd 2>/dev/null |