kergoth/dotfiles/obsidian-cli

Claude Code and agent skill by kergoth/dotfiles

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

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.

Install

npx vskill@latest install kergoth/dotfiles/obsidian-cli

SKILL.md

The same SKILL.md was published earlier as kergoth/dotfiles/obsidian-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

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
30
Repository forks
1
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kergoth/dotfiles/obsidian-cli/badge)](https://verified-skill.com/skills/kergoth/dotfiles/obsidian-cli)

Something wrong with this skill or its page? Tell us.