Index of every page on this site: llms.txt
All skills
goberomsu avatar

/obsidian-cli

@fe0f898
Run it yourself

Drives a running Obsidian desktop app through the official `obsidian` CLI: reads, creates, searches, moves, renames and appends notes, sets properties, lists tasks, tags, backlinks and unresolved links, and reloads, evaluates, screenshots and inspects plugins or themes and their errors. Use for vault work from a terminal or script, or "check the backlinks pointing at this note", "find which notes link here". Not for Markdown syntax, a third-party CLI of a similar name, headless sync or raw file edits.

  • 2 files
  • 25 KB
  • MIT
  • Updated last week
  • GitHub
Use this Skill: https://skilld.dev/gh/goberomsu/secondbrain-skills/obsidian-cli

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈130 tokens for metadata: the name and description. ≈2.8k when used: this file. ≈3.4k more on demand in 1 file.

Description uses 6.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈521 characters, or 6.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Obsidian CLI

Use the official obsidian CLI to operate a running Obsidian instance: read, create, search, move, mutate, and audit vault content, and drive the plugin and theme development loop. Success means the intended vault was targeted explicitly, the effect was authorized, and the result was read back from the exact path — not inferred from an exit code.

Binary identity

The executable is obsidian, installed by the Obsidian desktop app. It talks to an app instance, so Obsidian must be open for vault and developer commands to work.

Confirm the surface before relying on it:

obsidian version    # answers only when the app is running and reachable
obsidian help       # the authoritative command catalog for that build

obsidian help is always up to date for the installed build; this manual describes operations and their guarantees, not a frozen catalog. When the two disagree, help wins and the difference is version skew — see version skew.

There is no fallback surface. A third-party tool distributed under the name obsidian-cli — this skill's name, not this skill's binary — a headless sync client, an editor plugin, and raw shell writes into the vault folder are all different systems with different guarantees. If obsidian is missing, the app is not running, or the requested command is not in help, report that capability gap instead of substituting one of them. Full docs: https://help.obsidian.md/cli

Syntax

Parameters take a value with =. Quote values with spaces:

obsidian create name="My Note" content="Hello world"

Flags are boolean switches with no value:

obsidian vault="Research" create path="Scratch/My Note.md" overwrite

For multiline content use \n for newline and \t for tab.

Every command's exact parameter set comes from obsidian help. This manual shows the forms it documents; where a parameter name is not shown here, read it from help rather than guessing a plausible one.

File targeting

Many commands accept file or path to target a file. Without either, the active file is used.

  • file=<name> — resolves like a wikilink (name only, no path or extension needed)
  • path=<path> — exact path from vault root, e.g. folder/note.md

Prefer path= for every mutation. Both the active file and wikilink resolution depend on live app state, so they can silently select a different note than the one under discussion.

Vault routing

Commands target the most recently focused vault by default. That default is app state you did not set, so it is only acceptable for throwaway reads. Pass vault=<name> as the first parameter to target a specific vault:

obsidian vault="My Vault" search query="test"

Name vault= explicitly on every mutation, and on any read whose output you will act on. If the vault name is unknown, ambiguous, or the request never named one, stay read-only and see vault resolution. Never hardcode a vault name, absolute path, or account identifier into reusable content.

Operations

Reads:

obsidian read file="Meeting Notes"
obsidian read path="Projects/Roadmap.md"
obsidian daily:read

Create and additive writes:

obsidian create name="New Note" content="# Hello" template="Template"
obsidian create path="Projects/Roadmap.md" content="<full body>" overwrite
obsidian append file="Meeting Notes" content="New line"
obsidian prepend path="Projects/Roadmap.md" content="Status: draft"
obsidian daily:append content="- [ ] New task"
obsidian property:set name="status" value="done" file="Meeting Notes"

create ... overwrite replaces the whole note body; it is a destructive command wearing a create name. Use the narrowest command that produces the requested change — append, prepend, or the property: family — and reserve whole-body writes for notes the task is genuinely authorized to replace.

Move:

obsidian help move
obsidian vault="Research" move path="Scratch/Draft.md" to="Projects/Draft.md"

A move changes the note's identity in the vault. Whether inbound links are rewritten depends on the vault's link-update setting, so do not assume either way — audit links afterwards and verify all three of destination, old path, and backlinks. See write and move failures.

Search and audit:

obsidian search query="search term" limit=10
obsidian backlinks file="Meeting Notes"
obsidian links               # scope parameters per `obsidian help`
obsidian unresolved          # scope parameters per `obsidian help`
obsidian tasks daily todo
obsidian tags sort=count counts

obsidian help also lists a search:context variant of search. Search has been observed returning empty output with exit code 0 for a term that is present in the vault. Empty is indeterminate, never proof of absence — retry, then report the result as unconfirmed. See app or runtime unavailable.

Deletes:

obsidian delete path="Scratch/probe.md"

delete is destructive and needs explicit approved scope naming the exact paths. Clean up only probe files this task created.

Plugin and vault state:

obsidian plugins versions
obsidian plugins filter=community versions
obsidian plugins:enabled
obsidian plugin:enable       # target parameter per `obsidian help`
obsidian plugin:reload id=my-plugin

Read-only Sync state for a vault the desktop app already syncs is exposed by the sync: family listed in obsidian help; pairing, daemons, and headless clients are a different system and are out of scope here.

Use clipboard and count flags only when the installed command's help lists them. Obsidian 1.12.7 help create lists open and newtab, but not silent; omit open when no new view is wanted. total is supported by the list commands that advertise it.

Mutation contract

Every vault mutation follows this sequence. Skipping a step is how unrelated content gets lost.

  1. Resolve. Fix the exact vault, the vault-relative path, and the authorized effect before the first write. A working command is not authority to change a vault.
  2. Read first. obsidian read path="<target>" and keep that output as the pre-change snapshot.
  3. Write narrowly. Pick the smallest command that produces the requested change. Never rewrite a whole note to change one line.
  4. Read back. Re-read the same exact path and confirm two things: the requested change is materialized, and every untouched region — frontmatter, other sections, block IDs, links, trailing structure — matches the pre-change snapshot.
  5. Interpret honestly. Exit code 0 is not materialized content. Empty output is indeterminate, not success and not absence. A matching filename or title is not a verified body.

If readback is impossible because the app or bridge is unavailable, say the mutation is unverified rather than reporting it as done, and follow failure safety.

Plugin development

Develop/test cycle

After changing a plugin or theme, the cycle is done when the running app has loaded the changed code, its errors and warnings were read, and the rendered result was checked. Pick the commands from obsidian help on this build; for example:

obsidian plugin:reload id=my-plugin                  # load the changed plugin
obsidian dev:errors                                  # errors since the reload
obsidian dev:console level=error                     # console warnings and errors
obsidian dev:screenshot path=screenshot.png          # rendered state
obsidian dev:dom selector=".workspace-leaf" text     # or the DOM it produced

When an error appears, fix it and repeat.

Additional developer commands

Run JavaScript in the app context:

obsidian eval code="app.vault.getFiles().length"

Inspect CSS values:

obsidian dev:css selector=".workspace-leaf" prop=background-color

Toggle mobile emulation:

obsidian dev:mobile on

Run obsidian help to see additional developer commands including CDP and debugger controls.

eval executes arbitrary JavaScript inside the app. Keep it to read-only expressions unless a mutation through eval is explicitly authorized, and prefer a dedicated command whenever one exists. Plugin-provided commands only exist while that plugin is installed and enabled; their absence is plugin state, not a broken CLI.

Composition and boundaries

This package works standalone and owns the command surface, vault routing, the mutation contract, and readback evidence. It does not own Obsidian Markdown syntax, note meaning, filing, templates, or write authorization.

Load a note-format or vault-policy skill only when the request explicitly needs that decision. No such skill being installed is the normal case, not a degraded one; one being installed but not selected stays unused. A composed skill never re-specifies the commands documented here, and never converts a usable tool into permission to change a vault.

Out of scope: third-party CLIs, headless sync pairing and daemons, raw filesystem edits inside a vault, non-Obsidian Markdown, and web page extraction.

Failure branches

Load references/operations.md when an operation mutates, fails, or returns something ambiguous:

Verification

  • The binary was identified as obsidian and answered obsidian version before any claim about it.
  • The target vault was named explicitly for every mutation and acted-on read.
  • The narrowest command for the requested effect was used; whole-body writes and deletes had explicit approved scope.
  • Every mutation was read back from the exact path, with untouched regions compared against the pre-change snapshot.
  • Empty or exit-code-only results were reported as indeterminate or unverified, never as success.
  • No third-party binary, raw file write, or invented command substituted for a missing capability.

Attribution

Imported and modified from the MIT-licensed obsidian-cli skill in kepano/obsidian-skills, Copyright (c) 2026 Steph Ango (@kepano). The permission notice is retained in this repository's root LICENSE; the pinned source revision and the list of modifications are in Git history.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at fe0f898. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for goberomsu/secondbrain-skills/obsidian-cli