obsidian-cli

Use the Obsidian CLI to manage knowledge in an Obsidian vault — daily notes, search, tasks, tags, link graph analysis, properties, templates, and file operations. This skill should be used when the user asks to interact with their Obsidian vault, manage daily notes, search notes, manage tasks, explore tags or backlinks, set properties, use templates, or perform vault maintenance.

12 stars

Best use case

obsidian-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use the Obsidian CLI to manage knowledge in an Obsidian vault — daily notes, search, tasks, tags, link graph analysis, properties, templates, and file operations. This skill should be used when the user asks to interact with their Obsidian vault, manage daily notes, search notes, manage tasks, explore tags or backlinks, set properties, use templates, or perform vault maintenance.

Teams using obsidian-cli should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/obsidian-cli/SKILL.md --create-dirs "https://raw.githubusercontent.com/AlteredCraft/claude-code-plugins/main/plugins/obsidian-cli/skills/obsidian-cli/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/obsidian-cli/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How obsidian-cli Compares

Feature / Agentobsidian-cliStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use the Obsidian CLI to manage knowledge in an Obsidian vault — daily notes, search, tasks, tags, link graph analysis, properties, templates, and file operations. This skill should be used when the user asks to interact with their Obsidian vault, manage daily notes, search notes, manage tasks, explore tags or backlinks, set properties, use templates, or perform vault maintenance.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Obsidian CLI — Knowledge Management Skill

Use the `obsidian` CLI to interact with a running Obsidian instance from the terminal. The CLI connects to the running app and provides access to Obsidian-native capabilities: search indexing, the link graph, template variable resolution, frontmatter-aware property management, and task checkbox semantics.

## Prerequisites

- **Obsidian 1.12+** must be running (CLI connects to the running instance)
- **CLI enabled**: Settings > General > Enable "Command line interface"
- **Binary**: `/Applications/Obsidian.app/Contents/MacOS/obsidian` (added to PATH via `~/.zprofile`)

If the CLI returns connection errors, ask the user to ensure Obsidian is running.

## When to Use CLI vs. Native Tools

**Use the Obsidian CLI for:**
| Capability | Why CLI wins |
|---|---|
| Search | Uses Obsidian's indexed search — faster, respects aliases and tags |
| Backlinks / orphans / deadends | Requires Obsidian's link graph |
| Tasks | Checkbox semantics — toggle, done, todo, custom status characters |
| Properties | Frontmatter-aware — typed values (date, list, checkbox, number) |
| Templates | Variable resolution (`{{date}}`, `{{time}}`, `{{title}}`) |
| Daily notes | Respects daily note plugin settings (folder, format, template) |
| Outline / word count | Parsed heading tree, accurate word counts |
| Version history | Access Obsidian's file recovery and sync history |

**Use native tools (Read, Write, Grep, Glob) for:**
- Bulk file reads or multi-file edits
- Regex-based content search across many files
- File creation without templates
- Structural code or markdown changes
- Reading file contents when you need line numbers for Edit tool

**Combine both** when appropriate — e.g., use CLI `search` to find relevant files, then `Read` to inspect and `Edit` to modify.

## Syntax Conventions

```
obsidian <command> [parameter=value ...] [flags ...]
```

- **Parameters** take values: `parameter=value` or `parameter="value with spaces"`
- **Flags** are boolean switches with no value: `silent`, `overwrite`, `total`, `verbose`
- **Multiline content**: use `\n` for newline, `\t` for tab
- **Vault targeting**: `vault=<name>` must be the first parameter: `obsidian vault=Notes daily`
- **File targeting**: `file=<name>` resolves like wikilinks (name without path/extension); `path=<path>` requires exact path from vault root
- **Copy output**: add `--copy` to any command to copy output to clipboard
- **Output formats**: many commands support `format=json|text|csv|tsv|md|yaml|paths`

## Command Reference

### Daily Notes

| Command | Description |
|---|---|
| `daily` | Open today's daily note (creates if needed) |
| `daily:read` | Read daily note contents |
| `daily:append content=<text>` | Append content to daily note |
| `daily:prepend content=<text>` | Prepend content to daily note |

**Flags**: `paneType=tab|split|window`, `inline`, `silent`

```bash
# Read today's daily note
obsidian daily:read

# Add a task to today's note
obsidian daily:append content="- [ ] Review pull requests"

# Prepend a heading inline (no blank line separator)
obsidian daily:prepend content="## Morning Tasks" inline
```

### Search & Discovery

| Command | Description |
|---|---|
| `search query=<text>` | Search vault using Obsidian's index |
| `tags` | List tags (default: active file) |
| `tag name=<tag>` | Get tag info and usage |
| `backlinks` | List backlinks to a file |
| `links` | List outgoing links from a file |
| `orphans` | Files with no incoming links |
| `deadends` | Files with no outgoing links |
| `unresolved` | Unresolved (broken) wikilinks in vault |

**Search parameters**: `path=<folder>`, `limit=<n>`, `format=text|json`, `total`, `matches`, `case`

**Tags parameters**: `file=<name>`, `path=<path>`, `sort=count`, `all`, `total`, `counts`

**Link commands parameters**: `file=<name>`, `path=<path>`, `counts`, `total`, `verbose`

```bash
# Full-text search limited to a folder
obsidian search query="meeting notes" path=Work limit=10

# All tags with counts, sorted by frequency
obsidian tags all counts sort=count

# Files linking to a specific note
obsidian backlinks file="Project Alpha"

# Find broken links
obsidian unresolved verbose

# Find orphaned notes
obsidian orphans
```

### Reading & Writing

| Command | Description |
|---|---|
| `read file=<name>` | Read file contents |
| `create name=<name>` | Create a new file |
| `append file=<name> content=<text>` | Append content to file |
| `prepend file=<name> content=<text>` | Prepend content after frontmatter |
| `open file=<name>` | Open file in Obsidian |

**Create parameters**: `path=<path>`, `content=<text>`, `template=<name>`, `overwrite`, `silent`, `newtab`

```bash
# Create a note from a template
obsidian create name="Trip to Paris" path=Travel template=Travel

# Append a section to an existing note
obsidian append file="Meeting Notes" content="\n## Action Items\n- [ ] Follow up with team"

# Read a specific file
obsidian read path="Projects/Alpha/status.md"
```

### Task Management

| Command | Description |
|---|---|
| `tasks` | List tasks in vault or file |
| `task` | Show or update a specific task |

**Tasks parameters**: `file=<name>`, `path=<path>`, `status="<char>"`, `all`, `daily`, `total`, `done`, `todo`, `verbose`

**Task parameters**: `ref=<path:line>`, `file=<name>`, `path=<path>`, `line=<n>`, `status="<char>"`, `toggle`, `daily`, `done`, `todo`

```bash
# List incomplete tasks from daily note
obsidian tasks daily todo

# List all completed tasks
obsidian tasks done

# Count tasks in a file
obsidian tasks file="Sprint 12" total

# List tasks with file paths and line numbers
obsidian tasks verbose

# Toggle a task checkbox
obsidian task ref="Recipe.md:8" toggle

# Mark a daily note task as done
obsidian task daily line=3 done

# Set a custom status character
obsidian task file=Recipe line=8 status=-

# Filter by custom status
obsidian tasks 'status=?'
```

### Properties (Frontmatter)

| Command | Description |
|---|---|
| `properties` | List properties for a file or vault |
| `property:set name=<n> value=<v>` | Set a frontmatter property |
| `property:read name=<n>` | Read a property value |
| `property:remove name=<n>` | Remove a property |
| `aliases` | List aliases for a file or vault |

**Properties parameters**: `file=<name>`, `path=<path>`, `name=<name>`, `sort=count`, `format=yaml|tsv`, `all`, `total`, `counts`

**Property:set parameters**: `type=text|list|number|checkbox|date|datetime`, `file=<name>`, `path=<path>`

```bash
# List all properties used in vault with counts
obsidian properties all counts sort=count

# Set a typed property
obsidian property:set file="Project Alpha" name=status value=active type=text

# Set a date property
obsidian property:set file="Meeting" name=date value=2026-02-13 type=date

# Read a property
obsidian property:read file="Project Alpha" name=status

# Remove a property
obsidian property:remove file="Old Note" name=deprecated-field
```

### Templates

| Command | Description |
|---|---|
| `templates` | List available templates |
| `template:read name=<template>` | Read template content |
| `template:insert name=<template>` | Insert template into active file |

**Template:read flags**: `title=<title>`, `resolve` (processes `{{date}}`, `{{time}}`, `{{title}}`)

```bash
# List templates
obsidian templates

# Preview a template with variables resolved
obsidian template:read name=Meeting resolve title="Sprint Planning"

# Create a file using a template
obsidian create name="Weekly Review" path=Reviews template="Weekly Review"
```

### File & Folder Info

| Command | Description |
|---|---|
| `file file=<name>` | Show file metadata |
| `files` | List files in vault |
| `folder path=<path>` | Show folder info |
| `folders` | List folders in vault |
| `outline` | Show heading tree for a file |
| `wordcount` | Count words and characters |

**Files parameters**: `folder=<path>`, `ext=<extension>`, `total`

**Folder parameters**: `info=files|folders|size`

**Outline parameters**: `file=<name>`, `path=<path>`, `format=tree|md`, `total`

**Wordcount parameters**: `file=<name>`, `path=<path>`, `words`, `characters`

```bash
# List all markdown files in a folder
obsidian files folder=Projects ext=md

# Get heading structure
obsidian outline file="Architecture Doc" format=tree

# Count words
obsidian wordcount file="Draft Post"

# Folder size info
obsidian folder path=Attachments info=size
```

### Vault Maintenance

| Command | Description |
|---|---|
| `move file=<name> to=<path>` | Move or rename a file |
| `delete file=<name>` | Delete a file (to trash by default) |
| `bookmarks` | List bookmarks |
| `bookmark file=<path>` | Add a bookmark |

**Move parameters**: `path=<path>`

**Delete flags**: `permanent`

**Bookmark parameters**: `subpath=<subpath>`, `folder=<path>`, `search=<query>`, `url=<url>`, `title=<title>`

```bash
# Move a file
obsidian move file="Old Note" to="Archive/Old Note.md"

# Delete to trash
obsidian delete file="Scratch"

# Bookmark a file
obsidian bookmark file="Projects/Alpha/README.md" title="Alpha Project"
```

### Version History

| Command | Description |
|---|---|
| `diff` | List or compare file versions |
| `history file=<name>` | List local history versions |
| `history:list` | List all files with local history |
| `history:read file=<name> version=<n>` | Read a specific version |
| `history:restore file=<name> version=<n>` | Restore a version |

**Diff parameters**: `file=<name>`, `path=<path>`, `from=<n>`, `to=<n>`, `filter=local|sync`

```bash
# Compare latest version to current file
obsidian diff file=Recipe from=1

# Compare two historical versions
obsidian diff file=Recipe from=2 to=1

# List version history
obsidian history file="Important Doc"

# Read a specific version
obsidian history:read file="Important Doc" version=2

# Restore a previous version
obsidian history:restore file="Important Doc" version=3
```

### Vault Info

| Command | Description |
|---|---|
| `vault` | Show current vault info |
| `vaults` | List known vaults |
| `vault info=name` | Show just vault name |
| `vault info=path` | Show vault path |

```bash
obsidian vault
obsidian vault info=name
```

## Common Patterns

### Daily Task Review

```bash
# See today's tasks
obsidian tasks daily

# See incomplete tasks across vault
obsidian tasks todo

# Mark tasks done
obsidian task daily line=5 done
```

### Orphan Cleanup

```bash
# Find orphaned notes (no incoming links)
obsidian orphans

# For each orphan, check if it should be linked or archived
obsidian backlinks file="Orphan Note"
obsidian move file="Orphan Note" to="Archive/Orphan Note.md"
```

### Link Health Audit

```bash
# Find broken links
obsidian unresolved verbose

# Find dead-end notes (no outgoing links)
obsidian deadends

# Check specific file's connections
obsidian backlinks file="Hub Note" counts
obsidian links file="Hub Note"
```

### Tag Inventory

```bash
# Full tag report
obsidian tags all counts sort=count

# Find files with a specific tag
obsidian tag name=project-alpha verbose
```

### Template-Based Note Creation

```bash
# List available templates
obsidian templates

# Create note from template
obsidian create name="Client Meeting 2026-02-13" path=Meetings template=Meeting

# Append to newly created note
obsidian append file="Client Meeting 2026-02-13" content="\n## Notes\n- Discussed timeline"
```

Related Skills

qr-code

12
from AlteredCraft/claude-code-plugins

Generate QR codes from URLs, text, or other data and save them as SVG, PNG, EPS, or PDF files. This skill should be used when the user asks to create, generate, or make a QR code for any content such as website URLs, text strings, WiFi credentials, contact info, or other data. Triggers include mentions of 'QR code', 'QR', 'barcode for a link', or requests to make a scannable code. Supports customization of colors, size, error correction level, and output format.

powerpoint

12
from AlteredCraft/claude-code-plugins

Create professional PowerPoint presentations. Use when asked to "create a PowerPoint", "make a presentation", "build slides", or generate pptx files.

pdf-ocr

12
from AlteredCraft/claude-code-plugins

Parse PDF files to markdown using GLM-OCR via Ollama locally. Converts each page to an image, runs OCR, and outputs clean markdown. Use when the user wants to extract text from a PDF.

ralph-method

12
from AlteredCraft/claude-code-plugins

Set up a Ralph Wiggum task - runs Phase 1 (requirements interview) and Phase 2 (implementation planning), then stops with instructions to run the building loop. Creates namespaced specs in specs/[task-name]/.

journal

12
from AlteredCraft/claude-code-plugins

An agent to journal developer activity over a specified time period.

walkthrough-creator

12
from AlteredCraft/claude-code-plugins

Create and maintain the walkthrough artifact during implementation

task-list-creator

12
from AlteredCraft/claude-code-plugins

Create or update the task list artifact from gathered requirements

implementation-plan-creator

12
from AlteredCraft/claude-code-plugins

Create the implementation plan artifact from an approved task list

adr-manager

12
from AlteredCraft/claude-code-plugins

Add Architecture Decision Record (ADR) entries to an ADR file. This skill should be used when recording significant architectural decisions during development. It handles formatting and appending entries using Michael Nygard's ADR template.

essay-draft-from-research

12
from AlteredCraft/claude-code-plugins

Produces a long-form essay draft grounded in a user-supplied directory of research documents via an interview workflow. Use whenever the user wants to "draft an essay from my research", "write an essay from these notes", "turn this research directory into an essay", "I've been collecting notes on X, help me draft an essay", or "draft a long-form piece using these sources". Do NOT use for: one-shot summarization of a single document, short notes or tweets under ~600 words, pure research-findings synthesis with no drafting, or essay drafting when there is no research corpus to ground in.

feature-spec-creator

12
from AlteredCraft/claude-code-plugins

Generates a feature spec for an existing codebase via an interview workflow. Use when the user wants to write, draft, or scope a feature spec — phrases like "write a feature spec", "spec out this feature", "draft a spec for X", "I want to add X to this codebase", "let's plan a new feature", or "scope out this feature". Do NOT use for bug fixes, pure refactors with no behavior change, or greenfield projects with no existing code.

create-skill

12
from AlteredCraft/claude-code-plugins

Creates a new Claude Code skill that follows the Anchored Interview pattern — ground in a CORPUS, run an interview anchored by that grounding, then produce a single ARTIFACT. Use whenever the user wants to scaffold, generate, or design an interview-style skill — phrases like "make me an anchored interview skill", "create a skill that interviews me about X and produces Y", "scaffold a skill that reads my <corpus> and writes a <artifact>", "I want a skill for spec/draft/plan/findings creation via interview", or any request to build a skill that has the ground-then-ask-then-act shape. Do NOT use for: running an anchored interview on a specific task (this skill *creates* such skills, it doesn't perform them — for that, use or create the appropriate task-specific skill); editing an existing SKILL.md; one-shot transformations with no judgment calls; or skills where there is no corpus to ground in.