obsidian-cli

Manage Obsidian vault notes, tasks, and plugins through the Obsidian CLI.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill obsidian-cli-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obsidian-cli
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/obsidian-cli
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill obsidian-cli-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It removes the need to manually click through the Obsidian app by letting you read, create, search, and manage vault notes and tasks directly from the command line, and it streamlines plugin and theme debugging. ## Core Features & Use Cases - Vault Operations: Read, create, append to, and search notes, manage properties, tags, backlinks, and daily notes across one or more vaults. - Task Management: Query and append tasks, including daily note todos, without opening the app UI. - Plugin & Theme Development: Reload plugins, capture errors, run JavaScript in the app context, take screenshots, and inspect the DOM for debugging. - Use Case: While developing an Obsidian plugin, run obsidian plugin:reload id=my-plugin, check obsidian dev:errors, and capture a screenshot to verify changes without touching the app window. ## Quick Start Ask the assistant to search your Obsidian vault for notes matching a topic and append a new task to today's daily note using the obsidian CLI.

Frequently Asked Questions about obsidian-cli

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

FAQPage Schema
How do I create a note in Obsidian from the command line?

Use the obsidian CLI create command with a name and content parameter, for example obsidian create name="My Note" content="Hello world". Add the silent flag to prevent the file from opening and the overwrite flag to replace an existing note.

How do I search my Obsidian vault from the terminal?

Run obsidian search query="search term" with an optional limit parameter to control result count. You can target a specific vault by passing vault="Vault Name" as the first parameter.

Does the Obsidian CLI work when the app is closed?

No, the obsidian CLI requires Obsidian to be open because it communicates with a running 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=your-plugin-id to pick up changes, then check obsidian dev:errors for issues. You can verify visually with obsidian dev:screenshot or inspect the DOM with obsidian dev:dom.

What is the difference between file and path parameters in Obsidian CLI?

The file parameter resolves like a wikilink using just the note name, while path requires the exact path from the vault root such as folder/note.md. Without either, commands operate on the currently active file.