obsidian-cli

Manage Obsidian vaults and debug plugins through the Obsidian CLI.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/TrayMachi/dotfiles --skill obsidian-cli-traymachi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obsidian-cli
Source: https://github.com/TrayMachi/dotfiles/tree/main/agents/skills/obsidian-cli
Command: npx skills add https://github.com/TrayMachi/dotfiles --skill obsidian-cli-traymachi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with an Obsidian vault from the terminal or an AI assistant normally requires manual file manipulation or switching into the app UI. This Skill exposes the Obsidian CLI so you can read, create, search, and update notes, tasks, and properties directly against a running Obsidian instance, and iterate on plugin or theme development without leaving the command line. ## Core Features & Use Cases - Vault Operations: Read, create, append to, and search notes, manage daily notes, tasks, tags, backlinks, and note properties across one or more vaults. - Plugin & Theme Development: Reload plugins, capture errors, run JavaScript in the app context, take screenshots, inspect the DOM and CSS, and read console output for a tight develop-test loop. - Use Case: While building an Obsidian plugin, edit the code, then run obsidian plugin:reload id=my-plugin, check obsidian dev:errors, and verify the UI with obsidian dev:screenshot — all without touching the app window. ## Quick Start Ask the assistant to use the obsidian CLI to append a new task to today's daily note in your vault.

Frequently Asked Questions about obsidian-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create or edit Obsidian notes from the command line?

Use the obsidian CLI with commands like obsidian create name="My Note" content="Hello" or obsidian append file="My Note" content="New line". Target files with file= for wikilink-style names or path= for exact vault-relative paths.

How do I search my Obsidian vault from the terminal?

Run obsidian search query="search term" limit=10 to search vault content. Add vault="Vault Name" as the first parameter to target a specific vault instead of the most recently focused one.

Does the Obsidian CLI work when Obsidian is closed?

No, the obsidian CLI requires Obsidian to be open because it communicates with a running app instance. Commands target the most recently focused vault unless you specify one with the vault parameter.

How do I reload an Obsidian plugin after code changes?

Run obsidian plugin:reload id=my-plugin to reload the plugin, then check obsidian dev:errors for issues. Verify the result visually with obsidian dev:screenshot or inspect elements using obsidian dev:dom.

Can I run JavaScript inside Obsidian from the CLI?

Yes, use obsidian eval code="app.vault.getFiles().length" to execute JavaScript in the app context. You can also inspect CSS values with obsidian dev:css and read console output with obsidian dev:console.