<< All versions

Skill v1.0.1

currentAutomated scan100/100
kergoth/dotfiles/obsidian-cli

+4 new

──Details
PublishedOctober 25, 2026 at 06:09 PM
Content Hashsha256:eb23f128de7e86d6...
Git SHA503b9004bdec
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 5.1 KB)
SKILL.md5.1 KBactive
SKILL.md · 113 lines · 5.1 KB

version: "1.0.1" name: obsidian-cli description: Use when running the obsidian CLI command, interacting with an Obsidian vault from the terminal, creating/appending/reading notes programmatically, searching vault content, managing daily notes, querying tags or backlinks, or automating any Obsidian vault operations. Requires Obsidian 1.12+, app running, CLI enabled in Settings → General → CLI.


Obsidian CLI

Built-in CLI in Obsidian 1.12+ — the binary is named obsidian, not obsidian-cli. Do NOT use shell file manipulation (echo, sed, cat). Use this CLI for standard vault operations; use Read/Edit tools for surgical in-file edits the CLI doesn't support (no search-replace or line-specific insertion).

Quick Setup

  • macOS: modifies ~/.zprofile; binary inside /Applications/Obsidian.app/Contents/MacOS
  • Linux: symlink at /usr/local/bin/obsidian
  • Enable: Settings → General → CLI

Run obsidian (no args) for interactive TUI with autocomplete.

Sandbox

The CLI communicates with the running Obsidian app via IPC (Unix socket). Sandbox mode blocks this. Always use dangerouslyDisableSandbox: true for obsidian commands — they will fail silently or error within the sandbox.

Parameter Syntax — CRITICAL

text
obsidian <command> [parameter=value] [--flag]
  • Parameters: bare `parameter=value` — NO dashes, NO `--`
  • Flags: --flag (boolean, dashes only for these)
  • Vault targeting: vault=<name> — must come first
  • File targeting: file=<name> (wikilink resolution) or path=<exact/relative/path>
  • Multiline text: use \n and \t within quoted strings
  • Output format: format=json|tsv|csv|yaml|tree|md
  • Copy to clipboard: --copy

Content Quoting

Be careful when passing Markdown in content=... through the shell.

  • Backticks inside double-quoted shell strings trigger command substitution.
  • Prefer single-quoted content='...' when the text contains backticks.
  • A single-quoted heredoc such as <<'END' is a safe option for larger multiline content because the shell will not interpret backticks, $vars, or $(...) inside it.
  • If the text contains both apostrophes and backticks, slow down and choose quoting deliberately instead of guessing.

Common Patterns

bash
# Append task to today's daily note
obsidian daily:append content="- [ ] Review PR"
# Search vault, copy results to clipboard
obsidian search query="project alpha" --copy
# Read note by name (wikilink resolution)
obsidian read file="Meeting Notes 2026-02-15"
# Read note by exact vault-relative path
obsidian read path="Projects/Alpha/spec.md"
# Create note from template
obsidian create name="Sprint Planning" template=Weekly
# Prepend multiline header (use \n for newlines)
obsidian prepend file="Sprint Planning" content="## Goals\n"
# Create or overwrite a note safely when title collisions matter
obsidian create vault="knowledge-base" name="Skill Notes" overwrite content='## Notes'
# Shell-safe multiline content with a single-quoted heredoc
obsidian create vault="knowledge-base" name="Skill Notes" content="$(cat <<'END'
# Skill Notes
- Backticks like `SKILL.md` stay literal here.
END
)"

Mutation Pattern

For create, overwrite, rename, move, or delete operations where correctness matters:

  1. Resolve the target note intentionally with vault=, file=, or path=.
  2. Prefer idempotent flows such as create ... overwrite or read first, then append/prepend.
  3. Read the note back after the mutation to verify the result.

Common Mistakes

WrongRightWhy
obsidian-cli ...obsidian ...It's a built-in binary, not third-party
--file="Note"file="Note"Parameters have NO dashes
--path="..."path="..."Parameters have NO dashes
daily appenddaily:appendSubcommand uses colon separator
grep -r "..." vault/obsidian search query="..."Use CLI search; don't fall back to grep
echo "..." >> fileobsidian append content="..."Use CLI for append/prepend; Read/Edit tools for surgical edits
`... \pbcopy`... --copyUse built-in clipboard flag
content="... \code\ ..."content='... \code\ ...' or a <<'END' heredocAvoid shell command substitution from backticks
create name="Note" when Note.md may already existcreate name="Note" overwrite ... or read firstPrevent silent Note 1.md duplicates

Command Categories

See commands.md for full reference.

CategoryCommands
File Managementcreate, read, append, prepend, move, rename, delete
Daily Notes & Tasksdaily, daily:append, daily:prepend, daily:read, daily:path, tasks, task
Search & Navigationsearch, search:context, backlinks, links, orphans, deadends, unresolved
Metadatatags, aliases, properties, property:read, property:set, bookmarks
Vault Infovault, vaults, files, folders, file, outline, wordcount
Developerdevtools, dev:screenshot, eval, dev:dom, dev:css, plugin:reload, command
← v1.0.0All versions