Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
npx skills add terry-li-hm/skills --skill "obsidian-cli"
Install specific skill from multi-skill repository
# Description
Obsidian vault operations using obsidian-cli. Use for moving notes (updates wikilinks), frontmatter editing, or opening notes in Obsidian app.
# SKILL.md
name: obsidian-cli
description: Obsidian vault operations using obsidian-cli. Use for moving notes (updates wikilinks), frontmatter editing, or opening notes in Obsidian app.
user_invocable: false
github_url: https://github.com/Yakitrak/obsidian-cli
Obsidian CLI
CLI for Obsidian vault operations. Primary use case: moving/renaming notes with automatic wikilink updates.
When to Use
- Move/rename notes โ Updates all wikilinks across vault (direct file ops don't)
- Open note in Obsidian app โ When user wants to view in native app
- Frontmatter operations โ View or modify YAML frontmatter
- Fuzzy search โ When you don't know exact note name
For simple read/write operations, prefer direct file access (faster, no CLI overhead).
Prerequisites
obsidian-cliinstalled (/opt/homebrew/bin/obsidian-cli)- Default vault configured (Terry's vault:
/Users/terry/notes)
Commands
Check Default Vault
obsidian-cli print-default
Set Default Vault
# Takes vault name as arg (path auto-discovered from Obsidian config)
obsidian-cli set-default notes
Open Note in Obsidian
obsidian-cli open "Note Name"
obsidian-cli open "folder/Note Name"
Create Note
obsidian-cli create "New Note" --content "Initial content"
obsidian-cli create "folder/New Note" --content "Content here"
Print Note Contents
obsidian-cli print "Note Name"
Move/Rename Note (KEY FEATURE)
# Rename note (updates all wikilinks!)
obsidian-cli move "Old Name" "New Name"
# Move to different folder
obsidian-cli move "Note Name" "archive/Note Name"
# Move and rename
obsidian-cli move "drafts/Old Name" "published/New Name"
Delete Note
obsidian-cli delete "Note Name"
Fuzzy Search
obsidian-cli search "partial name"
Search Content
obsidian-cli search-content "search term"
Daily Note
obsidian-cli daily # Creates/opens today's daily note
Frontmatter Operations
# View frontmatter
obsidian-cli frontmatter "Note Name"
# Set frontmatter field
obsidian-cli frontmatter "Note Name" --set "status=active"
# Remove frontmatter field
obsidian-cli frontmatter "Note Name" --remove "draft"
Key Use Case: Renaming with Link Updates
When renaming a note that's linked from other notes:
Wrong way (breaks links):
mv "~/notes/Old Name.md" "~/notes/New Name.md"
Right way (updates links):
obsidian-cli move "Old Name" "New Name"
This scans the vault and updates all [[Old Name]] references to [[New Name]].
When NOT to Use
- Simple file reads โ Use
Readtool directly - Simple file writes โ Use
Writetool directly - Searching file contents โ Use
Greptool - Listing files โ Use
lsorGlob
The CLI adds overhead. Only use when you need its special capabilities (move with link updates, frontmatter, open in app).
Integration
- Complements
vault-pathfindingskill for linking conventions - Works alongside direct file operationsโchoose the right tool for the job
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.