obsidian-vault-manager
Obsidian Vault Manager
Prerequisites
Before performing vault operations:
-
Verify obsidian CLI is installed:
obsidian --versionThe CLI is the native
obsidianbinary that ships with the Obsidian desktop app — not a separate npm package. -
List available vaults:
obsidian vaults -
Get vault path:
obsidian vault "<name>" info=path
Overview
Use obsidian for vault operations that touch links or structure. For creating notes with substantial content (multi-line, frontmatter, etc.), use the Write tool directly after locating the vault path — the CLI's create command strips multi-line content when \n escapes are used.
Quick Reference
| Task | Command | Notes |
|---|---|---|
| List vaults | obsidian vaults |
Always run first |
| Vault info | obsidian vault "<name>" |
Name, path, file count |
| Vault path | obsidian vault "<name>" info=path |
Path only, good for scripting |
| List folders | obsidian "vault=<name>" folders |
Quote vault name if it has spaces |
| Read note | obsidian "vault=<name>" read "<note name>" |
Reads by name (fuzzy) |
| Create note | obsidian "vault=<name>" create path="folder/name.md" content="$CONTENT" |
Use printf to build $CONTENT for multi-line |
| Overwrite note | obsidian "vault=<name>" create path="..." content="$CONTENT" overwrite |
|
| Append to note | obsidian "vault=<name>" append path="<path>" content="<text>" |
|
| Move note | obsidian "vault=<name>" move path="old.md" newpath="new.md" |
Auto-updates all links |
| Search content | obsidian "vault=<name>" search query="<term>" [path=<folder>] [format=json] |
|
| Daily note | obsidian "vault=<name>" daily |
Create/open today's note |
See also:
- Complete obsidian Command Reference - All commands with flags and advanced usage
- Obsidian Syntax Reference - Wiki-links, tags, frontmatter, and markdown syntax
- Note Templates - Daily note, project, and meeting templates
Core Workflows
Step 1 — Find the Vault
# List vaults to confirm the name
obsidian vaults
# Get full info (name, path, file count)
obsidian vault "<name>"
# Get just the path (useful for scripting)
VAULT_PATH=$(obsidian vault "<name>" info=path)
Step 2 — Explore Structure
# List folders
obsidian "vault=<name>" folders
# Search for existing notes
obsidian "vault=<name>" search query="<topic>" path=<folder> format=json
Step 3 — Create Notes with Rich Content
Use printf to build the content variable — this correctly handles newlines and multi-line content including frontmatter:
CONTENT=$(printf '---\ntags:\n - til\nindex: "[[Today I learned]]"\n---\n## Heading\n\nContent here.')
obsidian "vault=<name>" create path="til/2026-04-27 My Note.md" content="$CONTENT"
Look at an existing note first to match local formatting conventions (tag names, frontmatter fields, index backlinks, etc.):
obsidian "vault=<name>" read "<existing note name>"
Moving/Reorganizing Notes
# ✅ CORRECT: Auto-updates all links
obsidian "vault=<name>" move path="Random Notes/Design.md" newpath="Projects/Design.md"
# ❌ WRONG: Breaks all links to this note
mv "vault/Random Notes/Design.md" "vault/Projects/Design.md"
Common Mistakes
| Mistake | Why Wrong | Fix |
|---|---|---|
Using obsidian-cli |
That's a different npm package — the tool is obsidian |
Use obsidian |
Using --flags syntax |
The CLI uses key=value positional args, not --flags |
Use key=value format |
create with \n in double-quoted string |
Escapes get stripped, content truncated | Use printf to build a $CONTENT variable |
Using mv to move notes |
Breaks all [[wiki-links]] to that note |
Use obsidian move |
| Not checking existing note format | Each vault has different tagging/frontmatter conventions | Read an existing note first |
| Using absolute paths in wiki-links | Breaks when vault moves | Use vault-relative paths |
When to Use Standard Tools
- Bulk content editing: Use
Editafter reading withobsidian read - Complex search patterns: Use
Grepdirectly on the vault path (useobsidian vault "<name>" info=pathto get it)
Always preserve:
- Frontmatter (YAML between
---) - Obsidian link syntax
[[Note]] - Tag syntax
#tag-name - Markdown structure
Success Criteria
Vault operations succeed when:
- All
[[wiki-links]]remain valid after moves - Notes created in correct vault location with full content intact
- Formatting matches existing notes in the same folder
- No broken links or orphaned notes
More from sjungling/claude-plugins
ios-swift-expert
This skill should be used when the user asks to "build an iOS app", "create a SwiftUI view", "fix Xcode build errors", "implement Core Data", "design app architecture", or "optimize Swift performance". Automatically activates when working with .swift files, Xcode projects (.xcodeproj, .xcworkspace), SwiftUI interfaces, or Apple platform frameworks (UIKit, Core Data, Combine, WidgetKit, App Intents). Not for cross-platform frameworks (React Native, Flutter), non-Apple platforms, or backend server development.
71cli-ux-designer
This skill should be used when the user asks to "design a CLI", "improve command structure", "format terminal output", "review CLI usability", "design help text", or "add flags and arguments". Automatically activates when designing new CLI tools, improving command interfaces, formatting terminal output, or reviewing CLI usability. Not for GUI/web design, backend APIs, or shell scripting.
48git-bisect-debugging
This skill should be used when the user asks to "find which commit broke this", "debug a regression", "bisect to find the bug", or says "this used to work". Automatically activates for performance regressions, test failures that appeared recently, or any issue known to have worked at a previous commit. Can be invoked from systematic-debugging or used standalone. Not for general debugging without a known-good commit or regression history.
24technical-writer
This skill should be used when the user asks to "write a README", "create API documentation", "draft release notes", "write a tutorial", "structure documentation", or "review docs for clarity". Automatically activates when working with .md files in docs/ directories, README files, or when discussing documentation structure, style guides, or content organization. Not for creative/marketing writing, academic papers, code comments/docstrings, or internal chat.
19tmux-aware
This skill should be used when the user asks to "start a service in tmux", "check tmux pane output", "manage background processes", or "run a server in a pane". Automatically activates when running in a TMUX session (detected by SessionStart hook). Not for one-off commands that do not need a persistent pane.
14structured-logging
This skill should be used when the user asks to "analyze data with SQLite", "query logs", "find patterns in test results", or "correlate errors across files". Automatically activates when parsing large output (>100 lines), correlating data from multiple sources, tracking state across operations, aggregating results (counts, averages, grouping), or querying the same dataset multiple times. Not for tiny datasets (<50 records) with a single simple query.
13