Skill

Automate Obsidian Vault Management and Plugin Development

Obsidian CLI drives a running Obsidian instance from the shell - notes, search, daily notes, and plugin development.

Works with obsidian

72
Spark score
out of 100
Updated 3 days ago
Version 15.5.1

Add to Favorites

Why it matters

Streamline your Obsidian vault management and plugin development process. This skill allows you to interact with a running Obsidian instance via the command line, automating tasks like note creation, content management, and plugin debugging.

Outcomes

What it gets done

01

Manage Obsidian vault content (create, read, append, search notes).

02

Automate Obsidian plugin and theme development cycles (reload, error checking, visual verification).

03

Execute custom JavaScript code within the Obsidian app context.

04

Inspect and manipulate Obsidian's CSS and mobile emulation settings.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-obsidian-cli | bash

Overview

Obsidian CLI

Obsidian CLI drives a running Obsidian instance from the shell - reading, creating, and searching notes, plus a plugin/theme reload-test-inspect development workflow. Use it for shell-driven vault management or plugin/theme development against a live Obsidian instance. Requires Obsidian to already be open.

What it does

Obsidian CLI is a command-line interface (obsidian) for driving a running Obsidian instance from the shell - reading, creating, and appending to notes, searching the vault, managing daily notes and properties, and inspecting tags and backlinks - plus a full plugin and theme development workflow (reload, error checking, visual verification, console inspection). It requires Obsidian to already be open, and obsidian help always reflects the current, up-to-date command list.

When to use - and when NOT to

Use it for managing vault content through the CLI, developing or debugging an Obsidian plugin or theme from the command line, or any shell-driven interaction with a running Obsidian app. It is the CLI-specific tool in this space, distinct from working with Obsidian's Bases (.base YAML files) or writing in Obsidian's own Markdown syntax such as wikilinks and callouts - this skill is purely about driving the running application via shell commands.

Inputs and outputs

Input: a command with key=value parameters, quoted if they contain spaces, and boolean flags with no value - \n and \t for multiline content, file=<name> to target a note by wikilink-style name or path=<path> for an exact vault-root path, defaulting to the active file if neither is given, and vault=<name> as the first parameter to target a non-default vault. Output: the result of the command, optionally copied to the clipboard with --copy, run without opening the file via silent, or counted via total on list commands.

obsidian create name="New Note" content="# Hello" template="Template" silent

For plugin and theme development specifically, it follows a fixed reload-check-verify-inspect cycle: obsidian plugin:reload id=my-plugin to pick up code changes, obsidian dev:errors to catch failures (repeating from reload if any appear), obsidian dev:screenshot or obsidian dev:dom to verify visually, and obsidian dev:console level=error to check for warnings - plus obsidian eval code="..." to run arbitrary JavaScript in the app context, obsidian dev:css to inspect computed CSS values, and obsidian dev:mobile on to toggle mobile emulation.

Integrations

Wraps Obsidian's own CLI surface (help.obsidian.md/cli) and its developer and debug commands, including CDP and debugger controls surfaced via obsidian help.

Who it's for

Obsidian users automating vault management from the shell - searching with a result limit, reading and appending the active or a named file, working with daily notes and note properties - and plugin or theme developers who want a fast reload-test-inspect loop against a live, running Obsidian instance instead of manually reloading and clicking through the UI.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.