/obsidian-toolkit:obsidian-clifrom obsidian-toolkit
This skill should be used when the user asks about "obsidian cli", "command line interface for obsidian", "automate obsidian", "script obsidian vault", "obsidian terminal commands", or wants to interact with their Obsidian vault from the command line for automation, scripting, or integration purposes.
Ships in obsidian-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Comprehensive guidance for using the official Obsidian CLI (v1.12+) to interact with vaults, manage files, execute commands, and automate workflows from the terminal.
The Obsidian CLI allows you to:
Prerequisite: the Obsidian desktop app must be installed (download from obsidian.md). The CLI is the app binary itself — resolve it per platform:
| Platform | Binary |
|---|---|
| macOS | /Applications/Obsidian.app/Contents/MacOS/Obsidian |
| Linux | obsidian on PATH (or the AppImage/flatpak binary) |
| Windows | %LOCALAPPDATA%\Obsidian\Obsidian.exe |
CLI Access: <obsidian-binary> <command> — examples below use an obsidian alias.
For convenience, create a shell alias (adjust the path per the table above):
# Add to ~/.zshrc or ~/.bashrc
alias obsidian="/Applications/Obsidian.app/Contents/MacOS/Obsidian"
Specify which vault to operate on:
# Use default vault
obsidian <command>
# Target specific vault
obsidian vault=MyVault <command>
# Get vault info
obsidian vault
obsidian vaults # List all known vaults
Best practice: Set up scripts with explicit vault= parameter for reliability.
Most commands support flexible file targeting:
# By file name (searches vault)
obsidian read file=MyNote
# By explicit path
obsidian read path=folder/subfolder/note.md
# Current/active file (omit both)
obsidian read
Many commands support multiple output formats:
# Human-readable (default)
obsidian tags
# JSON for scripting
obsidian tags format=json
# CSV/TSV for data processing
obsidian base:query format=csv
Create notes:
# Basic creation
obsidian create name=MyNote
# With content
obsidian create name=MyNote content="# Hello World"
# In specific folder
obsidian create name=MyNote path=folder/note.md
# From template
obsidian create name=MyNote template=default
# Open in new tab after creating
obsidian create name=MyNote newtab
# Overwrite if exists
obsidian create name=MyNote overwrite
Read notes:
# Read file content
obsidian read file=MyNote
# Read specific file by path
obsidian read path=daily/2026-02-15.md
Modify notes:
# Append content
obsidian append file=MyNote content="Additional text"
# Prepend content
obsidian prepend file=MyNote content="Top matter"
# Append inline (no newline)
obsidian append file=MyNote content="inline text" inline
Move/rename:
# Rename file
obsidian move file=OldName to=NewName.md
# Move to folder
obsidian move file=MyNote to=archive/MyNote.md
Delete:
# Move to trash
obsidian delete file=MyNote
# Permanent deletion
obsidian delete file=MyNote permanent
Daily note commands:
# Open today's daily note
obsidian daily
# Open in new tab
obsidian daily newtab
# Open in split pane
obsidian daily paneType=split
# Read daily note content
obsidian daily:read
# Append to daily note
obsidian daily:append content="- Meeting notes"
# Prepend to daily note
obsidian daily:prepend content="# Top of note"
Text search:
# Basic search
obsidian search query="important topic"
# Case-sensitive search
obsidian search query="Exact Match" case
# Limit results
obsidian search query="keyword" limit=10
# Search in folder
obsidian search query="term" path=projects
# Show match counts
obsidian search query="term" matches
# JSON output for scripting
obsidian search query="term" format=json
List files:
# All files
obsidian files
# In specific folder
obsidian files folder=projects
# Filter by extension
obsidian files ext=md
# Get total count
obsidian files total
Random note:
# Open random note
obsidian random
# From specific folder
obsidian random folder=ideas
# Read content (don't open)
obsidian random:read
Analyze links:
# Outgoing links from file
obsidian links file=MyNote
# Backlinks to file
obsidian backlinks file=MyNote
# Backlink counts
obsidian backlinks file=MyNote counts
# Orphaned files (no incoming links)
obsidian orphans
# Dead-end files (no outgoing links)
obsidian deadends
# Unresolved links
obsidian unresolved
Tag management:
# List all tags
obsidian tags
# Tags in specific file
obsidian tags file=MyNote
# Tag usage counts
obsidian tags counts
# Sort by usage
obsidian tags sort=count
# Get specific tag info
obsidian tag name=project
Properties (frontmatter):
# List all properties
obsidian properties
# Properties in file
obsidian properties file=MyNote
# Read property value
obsidian property:read name=status file=MyNote
# Set property
obsidian property:set name=status value=done file=MyNote
# Set with type
obsidian property:set name=due value=2026-12-31 type=date file=MyNote
# Remove property
obsidian property:remove name=draft file=MyNote
Plugin operations:
# List all plugins
obsidian plugins
# Only community plugins
obsidian plugins filter=community
# Only enabled plugins
obsidian plugins:enabled
# Get plugin info
obsidian plugin id=dataview
# Enable plugin
obsidian plugin:enable id=dataview
# Disable plugin
obsidian plugin:disable id=dataview
# Install community plugin
obsidian plugin:install id=dataview
# Install and enable
obsidian plugin:install id=dataview enable
# Uninstall plugin
obsidian plugin:uninstall id=dataview
# Reload plugin (development)
obsidian plugin:reload id=my-plugin
Run Obsidian commands:
# List all commands
obsidian commands
# Filter by prefix
obsidian commands filter=editor
# Execute command
obsidian command id=app:open-settings
# Common command IDs:
# - app:open-settings
# - app:reload
# - editor:toggle-bold
# - workspace:split-vertical
Hotkeys:
# List all hotkeys
obsidian hotkeys
# Get hotkey for command
obsidian hotkey id=app:open-vault
Template operations:
# List templates
obsidian templates
# Read template
obsidian template:read name=meeting
# Read with variables resolved
obsidian template:read name=meeting resolve title="Team Sync"
# Insert template into active file
obsidian template:insert name=meeting
Query Dataview database views:
# List all base files
obsidian bases
# List views in base
obsidian base:views file=Projects
# Query base
obsidian base:query file=Projects view=Active
# Different output formats
obsidian base:query file=Projects format=json
obsidian base:query file=Projects format=csv
# Create entry in base
obsidian base:create name="New Item" content="Description"
Bookmark management:
# List bookmarks
obsidian bookmarks
# Add file bookmark
obsidian bookmark file=MyNote
# Bookmark with heading
obsidian bookmark file=MyNote subpath="#Section"
# Bookmark folder
obsidian bookmark folder=projects
# Bookmark URL
obsidian bookmark url="https://example.com" title="Example"
Task operations:
# List all tasks
obsidian tasks
# Tasks in file
obsidian tasks file=MyNote
# Only incomplete tasks
obsidian tasks todo
# Only completed tasks
obsidian tasks done
# Toggle task status
obsidian task file=MyNote line=5 toggle
# Mark as done
obsidian task file=MyNote line=5 done
File history:
# List versions
obsidian history file=MyNote
# Read specific version
obsidian history:read file=MyNote version=3
# Restore version
obsidian history:restore file=MyNote version=3
# Open recovery UI
obsidian history:open file=MyNote
Sync history (if using Obsidian Sync):
# Sync status
obsidian sync:status
# Pause/resume sync
obsidian sync off
obsidian sync on
# List sync versions
obsidian sync:history file=MyNote
# Read sync version
obsidian sync:read file=MyNote version=2
# Restore sync version
obsidian sync:restore file=MyNote version=2
Daily note automation:
#!/bin/bash
# Append daily standup template
STANDUP=$(cat <<EOF
## Standup $(date +%Y-%m-%d)
### Yesterday
-
### Today
-
### Blockers
-
EOF
)
obsidian daily:append content="$STANDUP"
Batch file creation:
#!/bin/bash
# Create project notes from list
while IFS= read -r project; do
obsidian create \
name="$project" \
path="projects/$project.md" \
template=project-template \
silent
done < projects.txt
Export tag statistics:
#!/bin/bash
# Get tag counts as JSON and process with jq
obsidian tags counts format=json \
| jq -r '.[] | "\(.count)\t\(.tag)"' \
| sort -rn > tag-stats.tsv
Find files by property:
#!/bin/bash
# Find all files with status=in-progress
obsidian search query="status: in-progress" format=json \
| jq -r '.[].path'
Auto-archive completed tasks:
#!/bin/bash
# Move files with all completed tasks to archive
for file in $(obsidian tasks done format=json | jq -r '.[] | .file' | sort -u); do
# Check if file has any incomplete tasks
incomplete=$(obsidian tasks todo file="$file" total 2>/dev/null | grep -o '[0-9]*')
if [ "$incomplete" = "0" ]; then
echo "Archiving $file (all tasks complete)"
obsidian move file="$file" to="archive/$file"
fi
done
Sync external data:
#!/bin/bash
# Fetch external data and update note
data=$(curl -s https://api.example.com/status)
obsidian append \
file="API Status" \
content="## $(date)
$data
---"
# Execute JavaScript in Obsidian context
obsidian eval code="app.vault.getName()"
# Access app object
obsidian eval code="app.workspace.getActiveFile()?.path"
# Attach debugger
obsidian dev:debug on
# Query DOM
obsidian dev:dom selector=".workspace-leaf"
# Inspect CSS
obsidian dev:css selector=".markdown-preview-view"
# Console messages
obsidian dev:console
# Errors
obsidian dev:errors
# Screenshot
obsidian dev:screenshot path=screenshot.png
# Toggle mobile view
obsidian dev:mobile on
obsidian dev:mobile off
Automated testing:
#!/bin/bash
# Verify vault structure in CI
obsidian vault=TestVault files folder=tests total
if [ $? -ne 0 ]; then
echo "Vault test files missing"
exit 1
fi
Export to static site:
#!/bin/bash
# Export all markdown files with resolved templates
mkdir -p export
obsidian files ext=md format=json | jq -r '.[].path' | while read -r file; do
content=$(obsidian read path="$file")
echo "$content" > "export/$file"
done
Quick note creation:
#!/bin/bash
# Create quick capture note (for Alfred/Raycast)
title="$1"
content="${2:-}"
obsidian create \
name="$title" \
path="inbox/$title.md" \
content="$content" \
newtab \
silent
silent flag to suppress UI updates for batch operationsformat=json for programmatic processingtotal flag when you only need countsfolder= to reduce search scopeAlways check command exit codes:
if ! obsidian create name=MyNote; then
echo "Failed to create note"
exit 1
fi
vault= parameter explicitly in scriptspermanent deletion in automated scriptsDesign scripts to be re-runnable:
# Check if note exists before creating
if obsidian file file=MyNote 2>/dev/null; then
echo "Note already exists"
else
obsidian create name=MyNote
fi
Command not found:
# Create alias in shell profile
alias obsidian="/Applications/Obsidian.app/Contents/MacOS/Obsidian"
Vault not found:
# List available vaults
obsidian vaults verbose
# Use full vault name
obsidian vault="My Vault" <command>
File not found:
# Use path instead of name
obsidian read path=folder/note.md
# List files to verify path
obsidian files
For detailed command references:
references/quick-reference.md - Fast lookup for common commands and patternsreferences/file-commands.md - Complete file operation commandsreferences/setup-guide.md - Setup and quick start (v1.12+)Working examples in examples/:
daily-automation.sh - Daily note workflowsvault-reports.sh - Generate vault statisticsAfter mastering the CLI:
obsidian-mcp-server)obsidian-api-basicsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/obsidian-api-basicsThis skill should be used when the user asks to "create an Obsidian plugin", "plugin lifecycle", "plugin settings", "vault API", "register command", "add ribbon icon", or mentions Obsidian plugin fundamentals like onload, onunload, saveData, or loadData./obsidian-chat-uiThis skill should be used when the user asks to "create chat interface", "build sidebar", "ItemView", "streaming messages", "chat sidebar", "copilot UI", or mentions building chat or conversational interfaces in Obsidian plugins./obsidian-mcp-serverThis skill should be used when the user asks to "add MCP server", "Model Context Protocol", "expose vault tools", "Streamable HTTP", "MCP tools", or mentions integrating MCP servers in Obsidian plugins to expose vault operations.npx claudepluginhub hsb3/dotfiles-agents --plugin obsidian-toolkit