mcpField
O
obsidian-vault-manager

obsidian-vault-manager

github.com/sjunglingProductivity1442 installsUpdated 1d ago
Repository

About obsidian-vault-manager

obsidian-vault-manager is a skill for managing vaults through Obsidian’s native CLI. It guides note reading, creation, search, and organization, with specific handling for iCloud paths and large writes that preserves links.

Key features

  1. 01List vaults and inspect their paths
  2. 02Read, search, and create notes
  3. 03Append content and manage daily notes
  4. 04Move notes while updating links
  5. 05Chunk and verify large content writes

Use cases

  1. 01Inspect vault structure and find existing notes
  2. 02Create notes in local or iCloud vaults
  3. 03Reorganize notes while preserving wiki-links
  4. 04Write long Markdown content into a note

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/sjungling/sjungling-claude-plugins --skill obsidian-vault-manager

After installing, type/obsidian-vault-managerin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/templates/
daily-note-template.md
meeting-note-template.md
project-note-template.md
references/
obsidian-cli-reference.md
obsidian-syntax.md
scripts/
write-markdown-to-vault.js

Details

From the project README

Obsidian Vault Manager

Prerequisites

Before performing vault operations:

  1. Verify obsidian CLI is installed:

    obsidian --version
    

    The CLI is the native obsidian binary that ships with the Obsidian desktop app — not a separate npm package.

  2. List available vaults:

    obsidian vaults
    
  3. Get vault path:

    obsidian vault "<name>" info=path
    

Overview

Use obsidian for vault operations that touch links or structure. For iCloud-synced vaults (path contains Mobile Documents — check with obsidian vault "<name>" info=path), the Write tool is not reliable: iCloud paths are TCC-protected, so direct filesystem writes can be blocked even with the sandbox disabled — only the Obsidian app (via the CLI) is guaranteed to land. For creating a note with substantial content (multi-line, frontmatter, code blocks), use scripts/write-markdown-to-vault.js in this skill — it chunks large payloads under the CLI's ~10KB IPC ceiling, filters banner noise, retries transient errors, and verifies the write by reading the note back. Run it unsandboxed (the CLI hangs under the command sandbox). For vaults on ordinary filesystem paths (not iCloud), the Write tool works directly and is simpler for one-off notes.

Quick Reference

TaskCommandNotes
List vaultsobsidian vaultsAlways run first
Vault infoobsidian vault "<name>"Name, path, file count
Vault pathobsidian vault "<name>" info=pathPath only, good for scripting
List foldersobsidian "vault=<name>" foldersQuote vault name if it has spaces
Read noteobsidian "vault=<name>" read "<note name>"Reads by name (fuzzy)
Create note (large/iCloud)node scripts/write-markdown-to-vault.js --vault <name> --path <path> --input <file>Chunked, retried, verified — run unsandboxed
Create note (small, non-iCloud)obsidian "vault=<name>" create path="folder/name.md" content="$CONTENT"Use printf to build $CONTENT for multi-line
Overwrite noteobsidian "vault=<name>" create path="..." content="$CONTENT" overwrite
Append to noteobsidian "vault=<name>" append path="<path>" content="<text>"
Move noteobsidian "vault=<name>" move path="old.md" newpath="new.md"Auto-updates all links
Search contentobsidian "vault=<name>" search query="<term>" [path=<folder>] [format=json]
Daily noteobsidian "vault=<name>" dailyCreate/open today's note
Active/default vaultobsidian vaultNo name → the vault currently open
Append to daily noteobsidian "vault=<name>" daily:append content="<text>"Active vault; needs Daily Notes plugin

See also:

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

MistakeWhy WrongFix
Using obsidian-cliThat's a different npm package — the tool is obsidianUse obsidian
Using --flags syntaxThe CLI uses key=value positional args, not --flagsUse key=value format
create with \n in double-quoted stringEscapes get stripped, content truncatedUse printf to build a $CONTENT variable
Using Write on an iCloud vault pathTCC can silently block the write even with the sandbox disabledUse scripts/write-markdown-to-vault.js instead
Content over ~10KB in one create/append callSilent broken pipe (exit 0, nothing written) or a NativeImage errorUse scripts/write-markdown-to-vault.js — it chunks automatically
Using mv to move notesBreaks all [[wiki-links]] to that noteUse obsidian move
Not checking existing note formatEach vault has different tagging/frontmatter conventionsRead an existing note first
Using absolute paths in wiki-linksBreaks when vault movesUse vault-relative paths

When to Use Standard Tools

  • Bulk content editing: Use Edit after reading with obsidian read
  • Complex search patterns: Use Grep directly on the vault path (use obsidian vault "<name>" info=path to 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

Comments

Markdown supported