# Obsidian Cli

> |

- **Type:** Skill
- **Install:** `agentstack add skill-jlaska-obsidian-claude-plugins-obsidian-cli`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jlaska](https://agentstack.voostack.com/s/jlaska)
- **Installs:** 0
- **Category:** [Productivity](https://agentstack.voostack.com/c/productivity)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jlaska](https://github.com/jlaska)
- **Source:** https://github.com/jlaska/obsidian-claude-plugins/tree/main/skills/obsidian-cli

## Install

```sh
agentstack add skill-jlaska-obsidian-claude-plugins-obsidian-cli
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Obsidian CLI Skill

The `obsidian` CLI (available in Obsidian 1.12+) lets you control the running Obsidian app from the terminal. It has awareness of the vault's search index, link graph, tags, and UI state — things that direct file access cannot provide.

Full command reference: `skills/obsidian-cli/references/commands-full.md`

---

## Prerequisites

1. **Obsidian 1.12+** must be installed and running
2. **CLI must be registered**: In Obsidian → Settings → General → scroll to "CLI" → enable it
3. **PATH must include the CLI binary**: Add to `~/.zprofile`:
   ```bash
   export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"
   ```
   Then reload: `source ~/.zprofile`

### Verify setup

```bash
obsidian version
```

If this fails, walk through the prerequisites above. If the app is installed but CLI isn't on PATH:
```bash
/Applications/Obsidian.app/Contents/MacOS/obsidian version
```

---

## Core Syntax

```
obsidian  [param=value] [--flag]
```

- **Named parameters**: `obsidian read file="path/to/note.md"`
- **Vault targeting**: defaults to the vault matching the current directory; use `vault=VaultName` to override
- **Copy to clipboard**: append `--copy` to any command
- **Multiline content**: use `\n` for newlines, `\t` for tabs in `content=` params
- **Output formats**: many commands support `format=json`, `format=md`, `format=csv`

### File path conventions

Paths are relative to the vault root:
```bash
obsidian read file="Meetings/2026/03-March/02-Monday/2026-03-02-Team Sync.md"
```

---

## When to Use CLI vs Direct File Access

### Prefer CLI

| Task | CLI Command |
|------|-------------|
| Search with index/property awareness | `obsidian search query=X` |
| Find backlinks to a note | `obsidian backlinks file=X` |
| Find orphan or dead-end notes | `obsidian orphans`, `obsidian deadends` |
| Open a file in Obsidian's UI | `obsidian open file=X` |
| Aggregate tasks across vault | `obsidian tasks todo` |
| List/filter tags | `obsidian tags counts` |
| Run a command palette command | `obsidian command id=X` |
| Enable/disable a plugin | `obsidian plugin:enable id=X` |
| View file version history | `obsidian history file=X` |
| Diff against a previous version | `obsidian diff file=X` |
| Resolve template variables | `obsidian template:read file=X resolve=true` |
| Query a Base | `obsidian base:query file=X` |
| Take a UI screenshot | `obsidian dev:screenshot` |
| Evaluate JS in Obsidian context | `obsidian eval code=X` |

### Prefer direct file access (Read/Edit/Write)

| Task | Reason |
|------|--------|
| Surgical section-level editing | Edit tool gives precise control |
| Complex content creation | Write tool is more reliable for large content |
| Bulk file operations | Bash/Glob/Grep is faster |
| Obsidian is not running | CLI requires a running app |
| Frontmatter YAML manipulation | Edit tool handles quoting and indentation |
| Working with file structure/paths | Glob is faster than CLI for discovery |

### Use both (common pattern)

```
CLI for discovery → direct access for manipulation
```

Example: Find all meetings with a person (CLI search), then read/edit the specific file (Read/Edit tools).

---

## File & Folder Commands

```bash
# Create a new note
obsidian create file="Notes/My Note.md" content="# My Note\n\nContent here"

# Read a note's content
obsidian read file="Notes/My Note.md"

# Open a note in Obsidian's UI
obsidian open file="Notes/My Note.md"

# Append content to a note
obsidian append file="Notes/My Note.md" content="New paragraph\n\nMore text"

# Prepend content to a note
obsidian prepend file="Notes/My Note.md" content="## Added at top\n\n"

# Move or rename a note
obsidian move file="Old Name.md" target="New Name.md"

# Delete a note
obsidian delete file="Notes/Old Note.md"

# Get file metadata (size, modified date, links, tags)
obsidian info file="Notes/My Note.md"

# List files in a folder
obsidian files folder="Meetings/2026"

# List folders
obsidian folders
```

---

## App Control

```bash
# List all available command palette commands
obsidian commands

# Run a specific command by ID
obsidian command id="editor:toggle-bold"

# List workspaces
obsidian workspaces

# Switch to a workspace
obsidian workspace name="Research"

# List open tabs
obsidian tabs

# Close a tab
obsidian tab:close file="Notes/Something.md"

# Get recently opened files
obsidian recents

# Reload Obsidian (soft reload, preserves vault)
obsidian reload

# Restart Obsidian
obsidian restart
```

---

## Plugin Management

```bash
# List all plugins (installed, enabled status)
obsidian plugins

# Enable a plugin
obsidian plugin:enable id="dataview"

# Disable a plugin
obsidian plugin:disable id="dataview"

# Install a community plugin
obsidian plugin:install id="plugin-id"

# Uninstall a plugin
obsidian plugin:uninstall id="plugin-id"

# Reload a plugin (after code changes)
obsidian plugin:reload id="dataview"
```

---

## Theme & Snippet Management

```bash
# List installed themes
obsidian themes

# Set active theme
obsidian theme:set name="Minimal"

# Install a community theme
obsidian theme:install name="Minimal"

# List CSS snippets and their enabled status
obsidian snippets

# Enable a CSS snippet
obsidian snippet:enable name="my-snippet"

# Disable a CSS snippet
obsidian snippet:disable name="my-snippet"
```

---

## History & Versions

```bash
# View version history for a file
obsidian history file="Notes/My Note.md"

# Read a specific historical version
obsidian history:read file="Notes/My Note.md" version=2

# Diff current version against a historical version
obsidian diff file="Notes/My Note.md" version=1

# Restore a file to a historical version
obsidian history:restore file="Notes/My Note.md" version=3
```

---

## Developer Tools

```bash
# Open DevTools
obsidian devtools

# Take a screenshot of the Obsidian window
obsidian dev:screenshot

# Read the developer console log
obsidian dev:console

# Get recent JavaScript errors
obsidian dev:errors

# Evaluate JavaScript in Obsidian's context
obsidian eval code="app.vault.getName()"

# Read live plugin settings (useful for config discovery)
obsidian eval "code=JSON.stringify(app.internalPlugins.getPluginById('daily-notes').instance.options)"
obsidian eval "code=JSON.stringify(app.internalPlugins.getPluginById('templates').instance.options)"
obsidian eval "code=JSON.stringify(app.plugins.getPlugin('templater-obsidian')?.settings)"

# Get computed CSS for an element
obsidian dev:css selector=".workspace-leaf"

# Inspect DOM structure
obsidian dev:dom selector=".workspace"
```

---

## Templates

```bash
# List available templates
obsidian templates

# Read a template's raw content (use name=, not file=)
obsidian template:read "name=Meeting Template"

# Read a template with Templater variables resolved
obsidian template:read "name=Meeting Template" resolve=true

# Insert a template into the active note
obsidian template:insert "name=Meeting Template"
```

---

## Error Handling

- **"Obsidian is not running"**: Start Obsidian, then retry
- **"CLI not found"**: Check PATH setup (see Prerequisites); use full path `/Applications/Obsidian.app/Contents/MacOS/obsidian` as fallback
- **"CLI not registered"**: Go to Obsidian Settings → General → enable CLI
- **"No vault found"**: Run from within the vault directory, or add `vault=VaultName`
- **Command fails silently**: Try adding `format=json` to get structured error output

---

## Quick Reference

```bash
# Check version / confirm CLI works
obsidian version

# Vault info (all fields: name, path, files, folders, size)
obsidian vault

# Vault info — single field
obsidian vault info=path
obsidian vault info=name

# List all registered vaults with paths
obsidian vaults verbose

# Path to today's daily note (relative to vault root)
obsidian daily:path

# Open today's daily note in UI
obsidian daily

# Search vault
obsidian search query="kubernetes"

# List all tags
obsidian tags counts sort=count
```

Full command reference with all parameters and flags: `skills/obsidian-cli/references/commands-full.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jlaska](https://github.com/jlaska)
- **Source:** [jlaska/obsidian-claude-plugins](https://github.com/jlaska/obsidian-claude-plugins)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jlaska-obsidian-claude-plugins-obsidian-cli
- Seller: https://agentstack.voostack.com/s/jlaska
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
