kergoth/dotfiles/obsidian-cli
Claude Code and agent skill by kergoth/dotfiles
- community
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-cliSKILL.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
- 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) orpath=<exact/relative/path> - Multiline text: use
\nand\twithin 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
Mutation Pattern
For create, overwrite, rename, move, or delete operations where correctness matters:
- Resolve the target note intentionally with
vault=,file=, orpath=. - Prefer idempotent flows such as
create ... overwriteorreadfirst, thenappend/prepend. - Read the note back after the mutation to verify the result.
Common Mistakes
| Wrong | Right | Why | ||
|---|---|---|---|---|
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 append | daily:append | Subcommand uses colon separator | ||
grep -r "..." vault/ | obsidian search query="..." | Use CLI search; don't fall back to grep | ||
echo "..." >> file | obsidian append content="..." | Use CLI for append/prepend; Read/Edit tools for surgical edits | ||
| `... \ | pbcopy` | ... --copy | Use built-in clipboard flag | |
content="... \code\ ..." | content='... \code\ ...' or a <<'END' heredoc | Avoid shell command substitution from backticks | ||
create name="Note" when Note.md may already exist | create name="Note" overwrite ... or read first | Prevent silent Note 1.md duplicates |
Command Categories
See commands.md for full reference.
| Category | Commands | |
|---|---|---|
| File Management | create, read, append, prepend, move, rename, delete | |
| Daily Notes & Tasks | daily, daily:append, daily:prepend, daily:read, daily:path, tasks, task | |
| Search & Navigation | search, search:context, backlinks, links, orphans, deadends, unresolved | |
| Metadata | tags, aliases, properties, property:read, property:set, bookmarks | |
| Vault Info | vault, vaults, files, folders, file, outline, wordcount | |
| Developer | devtools, 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
- SKILL.md in the repositoryCheckinghome/dot_agents/skills/obsidian-cli/SKILL.md
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
[](https://verified-skill.com/skills/kergoth/dotfiles/obsidian-cli)