- name
- obsidian-cli
- description
- Interact with Obsidian using the official CLI to read, search, create, and manage notes, daily notes, tasks, properties, and more. Use when the user wants to query or manipulate vault content via the obsidian command.
- allowed-tools
- Bash(obsidian:*)
- license
- MIT
- metadata
- {"author":"lifidea","version":"1.0.0","created":"2026-02-28T00:00:00.000Z"}
# Obsidian CLI Skill
The official Obsidian command-line interface allows you to interact with your vault from the terminal — reading notes, searching, managing properties, handling tasks, and more.
## Prerequisites
Verify the CLI is installed and running:
```bash
obsidian --version
obsidian help
```
Requirements:
- **Obsidian v1.12+** (released late 2024)
- **Catalyst license or higher** (Obsidian Sync, Publish, or community support)
- **Obsidian must be running** — the CLI communicates via IPC with a live instance
- **macOS, Windows, or Linux** support
If not installed, download the latest Obsidian installer from https://obsidian.md/download
## Key Concepts
### IPC-Based Communication
The obsidian-cli works by connecting to a **running Obsidian instance** via inter-process communication (IPC). It does not manipulate files directly; all commands are executed through Obsidian's API, ensuring proper handling of plugins, sync, and vault structure.
### File vs Path Parameters
Two ways to target files:
- **`file=<name>`** — Resolves by name like wikilinks. Searches across folders to find the file. More flexible but slower.
- Example: `obsidian read file="My Note"` (finds the file regardless of folder)
- Best for: Quick access when you know the filename
- **`path=<path>`** — Exact path from vault root. No searching, just direct access.
- Example: `obsidian read path="Journal/2026-02-28.md"` (exact path required)
- Best for: Performance-sensitive operations, when you know the exact location
### Vault Parameter
By default, commands run against the **currently active vault**. Override with:
```bash
obsidian read file="Note" vault="My Vault"
```
### Quoting & Escaping
- **Spaces in values** — Always quote: `name="My Note"` not `name=My Note`
- **Newlines** — Use `\n`: `content="Line 1\nLine 2"`
- **Tabs** — Use `\t`: `content="Column1\tColumn2"`
### Flags vs Parameters
- **Flags** — Boolean options, no value needed: `--verbose`, `--overwrite`, `--inline`
- **Parameters** — Key=value pairs: `file="Name"`, `query="term"`, `limit=10`
## Syntax Guide
### Basic Command Structure
```bash
obsidian <command> [parameter=value...] [--flag...]
```
### Examples
```bash
# Parameters with simple values
obsidian read file="Journal"
# Parameters with spaces (quoted)
obsidian create name="My Daily Note" content="Hello world"
# Multiple parameters
obsidian search query="TODO" path="Projects" limit=10
# Flags
obsidian files folder="Project" --verbose
# Mixed
obsidian create path="Journal/2026-02-28.md" content="Daily note" --open
```
## File Targeting Patterns
### Read a Note by Name
```bash
obsidian read file="Meeting Notes"
```
Searches vault for `Meeting Notes.md` anywhere.
### Read by Exact Path
```bash
obsidian read path="Project/2026-02-28.md"
```
Reads from exact location; faster for known paths.
### Create with Template
```bash
obsidian create name="New Note" template="Daily Note Template"
```
### List Files in Folder
```bash
obsidian files folder="Journal"
```
## Command Reference
Commands are organized by category. Use `obsidian help <command>` for detailed options.
### File Operations
#### read
Read file contents. Returns full text or structured data.
```bash
# Read by name
obsidian read file="My Note"
# Read by path
obsidian read path="Journal/2026-02-28.md"
# Active file (omit file/path params)
obsidian read
```
#### create
Create a new file with optional content and template.
```bash
# Simple creation
obsidian create name="New Note"
# With content
obsidian create name="Daily Note" content="Today's note"
# With template
obsidian create name="Meeting" template="Meeting Template" --open --newtab
# With exact path
obsidian create path="Journal/2026-02-28.md" content="..." --overwrite
```
#### append
Add content to end of file.
```bash
obsidian append file="My Note" content="New line"
# Inline (no newline before appended text)
obsidian append file="My Note" content=" continued" --inline
```
#### prepend
Add content to beginning of file.
```bash
obsidian prepend file="My Note" content="Header\n"
# Inline
obsidian prepend file="My Note" content="[Start] " --inline
```
#### delete
Remove a file (sends to trash by default).
```bash
obsidian delete file="Old Note"
# Permanent deletion
obsidian delete path="Archive/obsolete.md" --permanent
```
#### rename
Change a file's name.
```bash
obsidian rename file="Old Name" name="New Name"
```
#### move
Move file to different folder.
```bash
obsidian move file="Note" to="Archive"
# Move with new name
obsidian move path="Journal/old.md" to="Archive/2025-old.md"
```
#### open
Open file in Obsidian editor.
```bash
obsidian open file="Note"
# Open in new tab
obsidian open file="Note" --newtab
```
### File Information
#### file
Show metadata about a file.
```bash
obsidian file file="My Note"
```
Returns: created date, modified date, size, links, backlinks count.
#### files
List all files in vault (optionally filtered).
```bash
# All files
obsidian files
# By folder
obsidian files folder="Journal"
# By extension
obsidian files ext="md"
# With count
obsidian files folder="Project" --total
```
#### folder
Show folder information.
```bash
obsidian folder path="Journal"
# Specific info
obsidian folder path="Journal" info=files # Number of files
obsidian folder path="Journal" info=size # Total size
obsidian folder path="Journal" info=folders # Number of subfolders
```
#### folders
List folders in vault.
```bash
obsidian folders
# Subfolders only
obsidian folders folder="Archive"
# With count
obsidian folders folder="Journal" --total
```
#### vault
Show vault information.
```bash
obsidian vault # All info
obsidian vault info=name # Vault name
obsidian vault info=path # Vault folder path
obsidian vault info=files # Total files
obsidian vault info=size # Total vault size
```
#### vaults
List all known vaults.
```bash
obsidian vaults
# Verbose (include paths)
obsidian vaults --verbose
```
#### wordcount
Count words and characters in file.
```bash
obsidian wordcount file="Chapter 1"
# Word count only
obsidian wordcount file="Chapter 1" --words
# Character count only
obsidian wordcount file="Chapter 1" --characters
```
### Searching & Navigation
#### search
Full-text search vault.
```bash
# Basic search
obsidian search query="TODO"
# Limited results
obsidian search query="meeting" limit=5
# In folder
obsidian search query="TODO" path="Projects"
# Case sensitive
obsidian search query="MyClass" --case
# JSON output
obsidian search query="bug" format=json
```
#### search:context
Search with matching line context.
```bash
# Show surrounding lines
obsidian search:context query="TODO" path="Journal"
# JSON format
obsidian search:context query="error" format=json
```
#### search:open
Open search dialog in Obsidian.
```bash
obsidian search:open query="TODO"
```
### Links & References
#### links
List outgoing links from a file.
```bash
obsidian links file="My Note"
# Count only
obsidian links file="My Note" --total
```
#### backlinks
List files linking to a target (incoming links).
```bash
obsidian backlinks file="Project Overview"
# Include link counts
obsidian backlinks file="Project Overview" --counts
# Format output
obsidian backlinks file="Project" format=json
```
#### aliases
Show aliases for a file (alternative names).
```bash
obsidian aliases file="Meeting"
# Count aliases
obsidian aliases file="Meeting" --total
# Verbose (include paths)
obsidian aliases file="Meeting" --verbose
# Aliases for active file
obsidian aliases --active
```
#### unresolved
List broken/unresolved links in vault.
```bash
obsidian unresolved
# Count only
obsidian unresolved --total
# Verbose (show source files)
obsidian unresolved --verbose
# JSON format
obsidian unresolved format=json
```
#### deadends
List files with no outgoing links.
```bash
obsidian deadends
# Count
obsidian deadends --total
# Include non-markdown files
obsidian deadends --all
```
#### orphans
List files with no incoming links (not referenced).
```bash
obsidian orphans
# Count
obsidian orphans --total
# Include non-markdown
obsidian orphans --all
```
### Tags
#### tags
List all tags in vault with frequencies.
```bash
obsidian tags
# For specific file
obsidian tags file="My Note"
# By path
obsidian tags path="Journal"
# With counts
obsidian tags --counts
# Sort by count
obsidian tags --counts sort=count
# JSON format
obsidian tags format=json
# Tags for active file
obsidian tags --active
```
#### tag
Get info about a specific tag.
```bash
obsidian tag name=meeting
# Count only
obsidian tag name=meeting --total
# List files with tag
obsidian tag name=work --verbose
```
### Tasks & Checklists
#### tasks
List all tasks in vault.
```bash
obsidian tasks
# Incomplete tasks
obsidian tasks --todo
# Completed tasks
obsidian tasks --done
# By file
obsidian tasks file="My Note"
# By path
obsidian tasks path="Journal"
# By status (e.g., "x" for done, "-" for in progress)
obsidian tasks status="-"
# Verbose (group by file with line numbers)
obsidian tasks --verbose
# JSON format
obsidian tasks format=json
# Tasks from daily note
obsidian tasks --daily
```
#### task
Show or update a single task.
```bash
# Show task at line 5 in Journal/2026-02-28.md
obsidian task ref="Journal/2026-02-28.md:5"
# Toggle task status
obsidian task ref="Journal/2026-02-28.md:5" --toggle
# Mark as done
obsidian task ref="Journal/2026-02-28.md:5" --done
# Mark as incomplete
obsidian task ref="Journal/2026-02-28.md:5" --todo
# Set custom status (e.g., in progress)
obsidian task file="My Note" line=3 status="-"
```
### Properties & Metadata
#### properties
List all properties in vault with usage counts.
```bash
obsidian properties
# Properties for specific file
obsidian properties file="My Note"
# By path
obsidian properties path="Journal"
# With counts
obsidian properties --counts
# Count specific property
obsidian properties name=category --total
# Sort by count
obsidian properties sort=count
# YAML format
obsidian properties format=yaml
# JSON format
obsidian properties format=json
# Properties for active file
obsidian properties --active
```
#### property:set
Set a property on a file.
```bash
obsidian property:set name=category value=work file="My Note"
# With type (auto-inferred if not specified)
obsidian property:set name=priority value=high file="Task" type=text
# List type
obsidian property:set name=tags value="work,urgent" file="Note" type=list
# Number type
obsidian property:set name=wordcount value=1500 file="Article" type=number
# Checkbox
obsidian property:set name=reviewed value=true file="Document" type=checkbox
# Date
obsidian property:set name=deadline value=2026-03-01 file="Task" type=date
```
#### property:read
Get a property value from a file.
```bash
obsidian property:read name=category file="My Note"
# By path
obsidian property:read name=priority path="Tasks/urgent.md"
```
#### property:remove
Delete a property from a file.
```bash
obsidian property:remove name=draft file="Article"
# By path
obsidian property:remove name=status path="Archive/old.md"
```
### Templates
#### templates
List all templates in vault.
```bash
obsidian templates
# Count
obsidian templates --total
```
#### template:read
Read template content (useful for understanding what template will insert).
```bash
obsidian template:read name="Daily Note"
# Resolve variables
obsidian template:read name="Daily Note" --resolve title="2026-02-28"
```
Auf GitHub ansehen