AI Agent Hub
Back to skills
Obsidian Vault Management icon

Obsidian Vault Management

Knowledge Management Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @zcwl/obsidian.

About this skill

The Specific Problem

Obsidian is a popular Markdown-based knowledge management app, but its native interface lacks robust command-line support for automation. Tasks like managing multiple vaults, performing bulk operations, or integrating with scripts become cumbersome. For instance, when notes are scattered across folders or need to be part of CI/CD pipelines, manual GUI interactions create bottlenecks. Challenges include updating wikilinks safely during renames or searching content across vaults efficiently.

Core Capabilities and Key Steps

The obsidian-cli tool addresses these issues by providing a command-line interface with core capabilities:
- Vault Discovery: It reads Obsidian's configuration file (e.g., ~/Library/Application Support/obsidian/obsidian.json) to locate active or default vault paths via obsidian-cli print-default, eliminating hard-coded paths.
- Search and Retrieval: Commands like obsidian-cli search "query" search note titles, while obsidian-cli search-content "query" performs full-text search inside notes, returning snippets and line numbers for script-friendly output.
- Note Creation and Movement: obsidian-cli create generates new notes with specified content. Crucially, obsidian-cli move renames or relocates notes while automatically updating all [[wikilinks]] and common Markdown links across the vault—this prevents broken references, a key advantage over simple file moves.
- Deletion and Cleanup: obsidian-cli delete removes notes, aiding in maintenance.

Operations act directly on .md files on disk, and Obsidian detects changes in real-time without manual refresh. For developers, this enables integrating Obsidian vaults into version control, backup, or automated publishing workflows.

Applicable Boundaries and Caveats

This skill depends on a correctly installed and running Obsidian desktop app with functional obsidian:// URI handlers. Key considerations include:
- Vault Path Management: Avoid assuming fixed paths; always use obsidian-cli print-default to read config, as users often have multiple vaults (e.g., work/personal, iCloud sync).
- Note Creation Limits: Do not create notes under hidden dot-folders (e.g., .obsidian/...), as Obsidian may refuse to process them.
- Direct Edit Alternative: For simple modifications, directly editing .md files is viable—Obsidian syncs automatically—but complex tasks like bulk link updates require CLI.
- Platform Specificity: Config file paths (e.g., macOS ~/Library/...) must be adjusted based on the operating system.

In summary, the obsidian-cli skill empowers engineers to treat Obsidian vaults as programmable assets, but adherence to its design constraints ensures stability and reliability.

Use Cases

  • When integrating an Obsidian vault into Git version control, use the obsidian-cli print-default command to quickly obtain the default vault path for automatic note synchronization in scripts.
  • While organizing research project notes, batch search for keywords across all notes using obsidian-cli search-content to efficiently locate relevant content scattered in different folders.
  • During team collaboration requiring restructuring note directory layouts, use obsidian-cli move to batch relocate note files while automatically updating all wikilinks to preserve reference integrity.
  • When periodically maintaining a personal knowledge base, utilize obsidian-cli delete to clean up expired notes, avoiding the tedium of manual one-by-one deletion.

Best For

  • Academic researchers: Need to regularly import experiment notes and literature summaries into Obsidian, using command-line scripts to automate backups to cloud storage.
  • Technical documentation engineers: Manage extensive API documentation and code snippet notes, relying on obsidian-cli to automatically update cross-references between notes during build processes.
  • Independent developers: Use Obsidian for project logs and task lists, seeking to integrate into automated workflows within their development environment via command line.
  • Content editors: Responsible for maintaining Markdown-based content libraries, requiring batch movement of note files without breaking internal links.