Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10c02c785b | |||
| 8fc3803385 | |||
| 0e524848b7 | |||
| 1e6f0a6b6b | |||
| 69c42bfb92 | |||
| cdb3bd2209 | |||
| 6f5ed7c70e |
@@ -0,0 +1,44 @@
|
|||||||
|
name: Claude Code Review
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, ready_for_review, reopened]
|
||||||
|
# Optional: Only run on specific file changes
|
||||||
|
# paths:
|
||||||
|
# - "src/**/*.ts"
|
||||||
|
# - "src/**/*.tsx"
|
||||||
|
# - "src/**/*.js"
|
||||||
|
# - "src/**/*.jsx"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
claude-review:
|
||||||
|
# Optional: Filter by PR author
|
||||||
|
# if: |
|
||||||
|
# github.event.pull_request.user.login == 'external-contributor' ||
|
||||||
|
# github.event.pull_request.user.login == 'new-developer' ||
|
||||||
|
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
issues: read
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Run Claude Code Review
|
||||||
|
id: claude-review
|
||||||
|
uses: anthropics/claude-code-action@v1
|
||||||
|
with:
|
||||||
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
|
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
||||||
|
plugins: 'code-review@claude-code-plugins'
|
||||||
|
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
|
||||||
|
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||||
|
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
name: Claude Code
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
pull_request_review_comment:
|
||||||
|
types: [created]
|
||||||
|
issues:
|
||||||
|
types: [opened, assigned]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
claude:
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||||
|
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||||
|
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
||||||
|
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
issues: read
|
||||||
|
id-token: write
|
||||||
|
actions: read # Required for Claude to read CI results on PRs
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Run Claude Code
|
||||||
|
id: claude
|
||||||
|
uses: anthropics/claude-code-action@v1
|
||||||
|
with:
|
||||||
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||||
|
|
||||||
|
# This is an optional setting that allows Claude to read CI results on PRs
|
||||||
|
additional_permissions: |
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
||||||
|
# prompt: 'Update the pull request description to include a summary of changes.'
|
||||||
|
|
||||||
|
# Optional: Add claude_args to customize behavior and configuration
|
||||||
|
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||||
|
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||||
|
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
A skill for AI coding agents that enables full control of [Obsidian](https://obsidian.md) vaults from the terminal using the official **Obsidian CLI** (v1.12+).
|
A skill for AI coding agents that enables full control of [Obsidian](https://obsidian.md) vaults from the terminal using the official **Obsidian CLI** (v1.12+).
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
@@ -13,22 +13,30 @@ A skill for AI coding agents that enables full control of [Obsidian](https://obs
|
|||||||
|
|
||||||
Once installed, your AI agent will know how to interact with Obsidian vaults through the official CLI — reading, creating, and editing notes; managing daily notes; running full-text search; querying tasks, tags, links, and properties; managing plugins and sync; and running developer tools.
|
Once installed, your AI agent will know how to interact with Obsidian vaults through the official CLI — reading, creating, and editing notes; managing daily notes; running full-text search; querying tasks, tags, links, and properties; managing plugins and sync; and running developer tools.
|
||||||
|
|
||||||
Covers **100+ commands** across all major areas:
|
Covers **130+ commands** across all major areas:
|
||||||
|
|
||||||
| Area | Commands |
|
| Area | Commands |
|
||||||
|---|---|
|
|---|---|
|
||||||
| **Files** | `read`, `create`, `append`, `prepend`, `move`, `delete`, `files`, `folders` |
|
| **Files** | `read`, `create`, `append`, `prepend`, `move`, `rename`, `delete`, `files`, `folders`, `file`, `random` |
|
||||||
| **Daily Notes** | `daily`, `daily:read`, `daily:append`, `daily:prepend` |
|
| **Daily Notes** | `daily`, `daily:read`, `daily:append`, `daily:prepend`, `daily:path` |
|
||||||
| **Search** | `search` with scoping, limits, JSON output |
|
| **Search** | `search`, `search:context` with scoping, limits, JSON output |
|
||||||
| **Properties** | `properties`, `property:read`, `property:set`, `property:remove` |
|
| **Properties** | `properties`, `property:read`, `property:set`, `property:remove`, `aliases` |
|
||||||
| **Tags** | `tags`, `tag` with counts and filtering |
|
| **Tags** | `tags`, `tag` with counts and filtering |
|
||||||
| **Tasks** | `tasks`, `task` — query, filter, toggle |
|
| **Tasks** | `tasks`, `task` — query, filter, toggle |
|
||||||
| **Links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` |
|
| **Links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` |
|
||||||
|
| **Bookmarks** | `bookmarks`, `bookmark` |
|
||||||
| **Templates** | `templates`, `template:read`, `template:insert` |
|
| **Templates** | `templates`, `template:read`, `template:insert` |
|
||||||
| **Plugins** | `plugins`, `plugin:enable/disable/install/reload` |
|
| **Plugins** | `plugins`, `plugin`, `plugin:enable/disable/install/uninstall`, `plugins:restrict` |
|
||||||
| **Sync** | `sync`, `sync:status`, `sync:history`, `sync:restore` |
|
| **Sync** | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` |
|
||||||
| **Developer** | `eval`, `dev:screenshot`, `dev:console`, `dev:errors` |
|
| **Themes** | `themes`, `theme`, `theme:set`, `theme:install/uninstall` |
|
||||||
| **Vault** | `vault`, `vaults`, `version`, `recents`, `outline`, `wordcount` |
|
| **Snippets** | `snippets`, `snippets:enabled`, `snippet:enable/disable` |
|
||||||
|
| **Commands** | `commands`, `command`, `hotkeys`, `hotkey` |
|
||||||
|
| **Bases** | `bases`, `base:query`, `base:views`, `base:create` |
|
||||||
|
| **History** | `history`, `history:list`, `history:read`, `history:restore` |
|
||||||
|
| **Workspace** | `workspace`, `tabs`, `tab:open` |
|
||||||
|
| **Diff** | `diff` |
|
||||||
|
| **Developer** | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `dev:mobile`, `devtools` |
|
||||||
|
| **Vault** | `vault`, `vaults`, `version`, `reload`, `restart`, `recents`, `outline`, `wordcount` |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -292,6 +300,10 @@ See [`skills/obsidian-cli/references/command-reference.md`](skills/obsidian-cli/
|
|||||||
| Wrong vault targeted | Multi-vault ambiguity | Pass vault name as the first argument: `obsidian "My Vault" ...` |
|
| Wrong vault targeted | Multi-vault ambiguity | Pass vault name as the first argument: `obsidian "My Vault" ...` |
|
||||||
| IPC socket not found (Linux) | `PrivateTmp=true` in systemd unit | Set `PrivateTmp=false` |
|
| IPC socket not found (Linux) | `PrivateTmp=true` in systemd unit | Set `PrivateTmp=false` |
|
||||||
| Snap confinement errors | Snap restricts IPC | Use the `.deb` package instead |
|
| Snap confinement errors | Snap restricts IPC | Use the `.deb` package instead |
|
||||||
|
| Multi-vault `"Name" command` fails | Vault name matching issue | Omit vault name; switch vault manually in Obsidian UI |
|
||||||
|
| `property:set` list value is a string | CLI stores value as-is | Edit frontmatter directly or use `eval` to call Obsidian API |
|
||||||
|
| Colon+params exit 127 (missing `.com`) | Outdated installer — `Obsidian.com` absent | Reinstall from [obsidian.md/download](https://obsidian.md/download) |
|
||||||
|
| Colon+params exit 127 (Git Bash / MSYS2) | Bash resolves `obsidian` to `.exe` not `.com` | Create `~/bin/obsidian` wrapper: `#!/bin/bash` + `/c/path/to/Obsidian.com "$@"`, add `export PATH="$HOME/bin:$PATH"` to `~/.bashrc` |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+61
-1
@@ -39,6 +39,46 @@
|
|||||||
"query": "move everything in my Inbox/ folder to Archive/2026/ and update the daily note with a log entry",
|
"query": "move everything in my Inbox/ folder to Archive/2026/ and update the daily note with a log entry",
|
||||||
"should_trigger": true
|
"should_trigger": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"query": "check the sync history for my important.md and restore the version from two days ago",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "list all my bookmarks in obsidian",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "run obsidian eval to count how many markdown files have a 'status' property set to 'done'",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "find all notes in my vault that link to projects/q1-review.md",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "take a screenshot of my current obsidian view and save it to screenshots/",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "show me all tags in my vault sorted by how often they're used",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "query my Obsidian Bases 'Tasks' view and show all entries where priority is high",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "what notes have i opened recently in obsidian?",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "delete my scratch/temp-ideas.md note permanently",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "rename my 'Meeting 2026-02-28.md' note to 'Sprint Retro 2026-02-28.md'",
|
||||||
|
"should_trigger": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"query": "how do i change the accent color in obsidian? i want something more muted than the default purple",
|
"query": "how do i change the accent color in obsidian? i want something more muted than the default purple",
|
||||||
"should_trigger": false
|
"should_trigger": false
|
||||||
@@ -78,5 +118,25 @@
|
|||||||
{
|
{
|
||||||
"query": "i'm writing a python script to parse markdown files from my notes folder and extract all the headings into a CSV — what's the best library for this?",
|
"query": "i'm writing a python script to parse markdown files from my notes folder and extract all the headings into a CSV — what's the best library for this?",
|
||||||
"should_trigger": false
|
"should_trigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "how does obsidian's graph view work? i want to understand what the clusters represent",
|
||||||
|
"should_trigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "is there a way to publish my obsidian vault publicly? what are the options?",
|
||||||
|
"should_trigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "how do i configure a hotkey in obsidian to run a specific command from the command palette?",
|
||||||
|
"should_trigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "explain what the 'unresolved links' section in obsidian's graph view means",
|
||||||
|
"should_trigger": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "how do i use templater plugin variables like {{date}} in obsidian?",
|
||||||
|
"should_trigger": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ The official Obsidian CLI (released in v1.12, February 2026) lets you control ev
|
|||||||
|
|
||||||
- **macOS / Linux**: The `obsidian` binary is registered in PATH automatically when you enable CLI in settings.
|
- **macOS / Linux**: The `obsidian` binary is registered in PATH automatically when you enable CLI in settings.
|
||||||
- **Windows**: Requires an `Obsidian.com` redirector file placed alongside `Obsidian.exe`. **Must run with normal user privileges** — admin terminals produce silent failures.
|
- **Windows**: Requires an `Obsidian.com` redirector file placed alongside `Obsidian.exe`. **Must run with normal user privileges** — admin terminals produce silent failures.
|
||||||
|
- If colon subcommands (`property:set`, `daily:append`, etc.) with parameters return exit 127, check that `Obsidian.com` exists alongside `Obsidian.exe`. If missing, you have an outdated installer — download the latest from [obsidian.md/download](https://obsidian.md/download) and reinstall.
|
||||||
|
- **Git Bash / MSYS2 users**: Bash resolves `obsidian` to `Obsidian.exe` (GUI) instead of `Obsidian.com` (CLI), causing colon+params to fail with exit 127 even when `Obsidian.com` is present. Create a wrapper script — see Troubleshooting.
|
||||||
- **Headless Linux**: Use the `.deb` package (not snap). Run under `xvfb`. Prefix commands with `DISPLAY=:5` (or your xvfb display number). Ensure `PrivateTmp=false` if running as a service.
|
- **Headless Linux**: Use the `.deb` package (not snap). Run under `xvfb`. Prefix commands with `DISPLAY=:5` (or your xvfb display number). Ensure `PrivateTmp=false` if running as a service.
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
@@ -79,7 +81,7 @@ The CLI provides **130+ commands** across these groups:
|
|||||||
| **history** | `history`, `history:list`, `history:read`, `history:restore` | File version recovery (File Recovery plugin) |
|
| **history** | `history`, `history:list`, `history:read`, `history:restore` | File version recovery (File Recovery plugin) |
|
||||||
| **workspace** | `workspace`, `tabs`, `tab:open` | Workspace layout and tab management |
|
| **workspace** | `workspace`, `tabs`, `tab:open` | Workspace layout and tab management |
|
||||||
| **diff** | `diff` | Compare local vs sync file versions |
|
| **diff** | `diff` | Compare local vs sync file versions |
|
||||||
| **dev** | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `devtools` | Developer/debugging tools |
|
| **dev** | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `dev:mobile`, `devtools` | Developer/debugging tools |
|
||||||
| **vault** | `vault`, `vaults`, `version`, `reload`, `restart` | Vault info and app control |
|
| **vault** | `vault`, `vaults`, `version`, `reload`, `restart` | Vault info and app control |
|
||||||
| **other** | `outline`, `wordcount`, `recents` | Utility commands |
|
| **other** | `outline`, `wordcount`, `recents` | Utility commands |
|
||||||
|
|
||||||
@@ -241,6 +243,7 @@ obsidian command id="dataview:dataview-force-refresh-views"
|
|||||||
obsidian eval code="$(cat /tmp/obs.js)"
|
obsidian eval code="$(cat /tmp/obs.js)"
|
||||||
```
|
```
|
||||||
12. **Multi-vault targeting may not work in all environments** — `obsidian "My Vault" command` can return `Error: Command "My Vault" not found` on some setups. If this happens, omit the vault name (CLI targets the most recently active vault) and switch vaults manually in the Obsidian UI.
|
12. **Multi-vault targeting may not work in all environments** — `obsidian "My Vault" command` can return `Error: Command "My Vault" not found` on some setups. If this happens, omit the vault name (CLI targets the most recently active vault) and switch vaults manually in the Obsidian UI.
|
||||||
|
13. **When colon subcommands are unavailable** (e.g. Windows Git Bash without wrapper), prefer non-colon alternatives: use `properties` instead of `property:read`, and `obsidian daily:path` + `append` instead of `daily:append`.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@@ -254,3 +257,5 @@ obsidian command id="dataview:dataview-force-refresh-views"
|
|||||||
| Snap confinement issues | Snap restricts IPC | Use `.deb` package instead |
|
| Snap confinement issues | Snap restricts IPC | Use `.deb` package instead |
|
||||||
| Multi-vault `"Name" command` fails | Vault name matching issue | Omit vault name; target most recent vault |
|
| Multi-vault `"Name" command` fails | Vault name matching issue | Omit vault name; target most recent vault |
|
||||||
| `property:set` list value is a string | CLI stores value as-is | Edit frontmatter directly or use `eval` |
|
| `property:set` list value is a string | CLI stores value as-is | Edit frontmatter directly or use `eval` |
|
||||||
|
| Colon+params exit 127 (missing `.com`) | Outdated installer — `Obsidian.com` absent | Reinstall from [obsidian.md/download](https://obsidian.md/download) |
|
||||||
|
| Colon+params exit 127 (Git Bash / MSYS2) | Bash resolves `obsidian` to `.exe` not `.com` | Create `~/bin/obsidian` wrapper: `#!/bin/bash` / `/c/path/to/Obsidian.com "$@"` and add `export PATH="$HOME/bin:$PATH"` to `~/.bashrc` |
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: obsidian-cli
|
name: obsidian-cli
|
||||||
|
version: "1.3.0"
|
||||||
description: >
|
description: >
|
||||||
Use this skill whenever the user wants Claude to directly interact with their
|
Use this skill whenever the user wants Claude to directly interact with their
|
||||||
Obsidian vault — reading a note or daily note, writing or appending content,
|
Obsidian vault — reading a note or daily note, writing or appending content,
|
||||||
@@ -8,10 +9,37 @@ description: >
|
|||||||
has no way to access vault data or execute vault operations. Treat any request that
|
has no way to access vault data or execute vault operations. Treat any request that
|
||||||
implies "go into my vault and do X" as a trigger — the user is asking Claude to act,
|
implies "go into my vault and do X" as a trigger — the user is asking Claude to act,
|
||||||
not to explain. Also trigger for vault automation, CLI scripting, or cron-based
|
not to explain. Also trigger for vault automation, CLI scripting, or cron-based
|
||||||
workflows involving Obsidian. Skip for pure conceptual questions: how Obsidian's GUI
|
workflows involving Obsidian, managing sync history, querying Bases, restoring file
|
||||||
works, navigating settings menus, theme or plugin installation via the UI, or general
|
versions via history, managing bookmarks, or running JavaScript against the Obsidian
|
||||||
Dataview query syntax — anything where the user needs an explanation rather than
|
API. Skip for pure conceptual questions: how Obsidian's GUI works, navigating settings
|
||||||
Claude performing a vault operation.
|
menus, theme or plugin installation via the UI, iCloud/third-party sync conflicts,
|
||||||
|
general Dataview query syntax, keyboard shortcuts, or parsing vault files with external
|
||||||
|
scripts — anything where the user needs an explanation rather than Claude performing a
|
||||||
|
vault operation.
|
||||||
|
triggers:
|
||||||
|
- "obsidian"
|
||||||
|
- "vault"
|
||||||
|
- "daily note"
|
||||||
|
- "obsidian cli"
|
||||||
|
- "note"
|
||||||
|
- "append to"
|
||||||
|
- "prepend to"
|
||||||
|
- "search my vault"
|
||||||
|
- "create a note"
|
||||||
|
- "read note"
|
||||||
|
- "move note"
|
||||||
|
- "rename note"
|
||||||
|
- "delete note"
|
||||||
|
- "tasks in obsidian"
|
||||||
|
- "open tasks"
|
||||||
|
- "backlinks"
|
||||||
|
- "orphaned notes"
|
||||||
|
- "broken links"
|
||||||
|
- "frontmatter"
|
||||||
|
- "properties"
|
||||||
|
- "sync history"
|
||||||
|
- "obsidian bases"
|
||||||
|
- "file history"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Obsidian CLI
|
# Obsidian CLI
|
||||||
@@ -26,7 +54,7 @@ The official Obsidian CLI (released in v1.12, February 2026) lets you control ev
|
|||||||
|
|
||||||
| Requirement | Details |
|
| Requirement | Details |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Obsidian Desktop | **v1.12.0+** |
|
| Obsidian Desktop | **v1.12.4+** (recommended; CLI introduced in v1.12.0) |
|
||||||
| CLI enabled | Settings → Command line interface → Toggle ON |
|
| CLI enabled | Settings → Command line interface → Toggle ON |
|
||||||
| Obsidian running | The desktop app **must be running** for CLI to work (IPC) |
|
| Obsidian running | The desktop app **must be running** for CLI to work (IPC) |
|
||||||
|
|
||||||
@@ -34,6 +62,8 @@ The official Obsidian CLI (released in v1.12, February 2026) lets you control ev
|
|||||||
|
|
||||||
- **macOS / Linux**: The `obsidian` binary is registered in PATH automatically when you enable CLI in settings.
|
- **macOS / Linux**: The `obsidian` binary is registered in PATH automatically when you enable CLI in settings.
|
||||||
- **Windows**: Requires an `Obsidian.com` redirector file placed alongside `Obsidian.exe`. **Must run with normal user privileges** — admin terminals produce silent failures.
|
- **Windows**: Requires an `Obsidian.com` redirector file placed alongside `Obsidian.exe`. **Must run with normal user privileges** — admin terminals produce silent failures.
|
||||||
|
- If colon subcommands (`property:set`, `daily:append`, etc.) with parameters return exit 127, check that `Obsidian.com` exists alongside `Obsidian.exe`. If missing, you have an outdated installer — download the latest from [obsidian.md/download](https://obsidian.md/download) and reinstall.
|
||||||
|
- **Git Bash / MSYS2 users**: Bash resolves `obsidian` to `Obsidian.exe` (GUI) instead of `Obsidian.com` (CLI), causing colon+params to fail with exit 127 even when `Obsidian.com` is present. Create a wrapper script — see Troubleshooting.
|
||||||
- **Headless Linux**: Use the `.deb` package (not snap). Run under `xvfb`. Prefix commands with `DISPLAY=:5` (or your xvfb display number). Ensure `PrivateTmp=false` if running as a service.
|
- **Headless Linux**: Use the `.deb` package (not snap). Run under `xvfb`. Prefix commands with `DISPLAY=:5` (or your xvfb display number). Ensure `PrivateTmp=false` if running as a service.
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
@@ -79,7 +109,7 @@ The CLI provides **130+ commands** across these groups:
|
|||||||
| **history** | `history`, `history:list`, `history:read`, `history:restore` | File version recovery (File Recovery plugin) |
|
| **history** | `history`, `history:list`, `history:read`, `history:restore` | File version recovery (File Recovery plugin) |
|
||||||
| **workspace** | `workspace`, `tabs`, `tab:open` | Workspace layout and tab management |
|
| **workspace** | `workspace`, `tabs`, `tab:open` | Workspace layout and tab management |
|
||||||
| **diff** | `diff` | Compare local vs sync file versions |
|
| **diff** | `diff` | Compare local vs sync file versions |
|
||||||
| **dev** | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `devtools` | Developer/debugging tools |
|
| **dev** | `eval`, `dev:screenshot`, `dev:debug`, `dev:console`, `dev:errors`, `dev:css`, `dev:dom`, `dev:mobile`, `devtools` | Developer/debugging tools |
|
||||||
| **vault** | `vault`, `vaults`, `version`, `reload`, `restart` | Vault info and app control |
|
| **vault** | `vault`, `vaults`, `version`, `reload`, `restart` | Vault info and app control |
|
||||||
| **other** | `outline`, `wordcount`, `recents` | Utility commands |
|
| **other** | `outline`, `wordcount`, `recents` | Utility commands |
|
||||||
|
|
||||||
@@ -241,6 +271,7 @@ obsidian command id="dataview:dataview-force-refresh-views"
|
|||||||
obsidian eval code="$(cat /tmp/obs.js)"
|
obsidian eval code="$(cat /tmp/obs.js)"
|
||||||
```
|
```
|
||||||
12. **Multi-vault targeting may not work in all environments** — `obsidian "My Vault" command` can return `Error: Command "My Vault" not found` on some setups. If this happens, omit the vault name (CLI targets the most recently active vault) and switch vaults manually in the Obsidian UI.
|
12. **Multi-vault targeting may not work in all environments** — `obsidian "My Vault" command` can return `Error: Command "My Vault" not found` on some setups. If this happens, omit the vault name (CLI targets the most recently active vault) and switch vaults manually in the Obsidian UI.
|
||||||
|
13. **When colon subcommands are unavailable** (e.g. Windows Git Bash without wrapper), prefer non-colon alternatives: use `properties` instead of `property:read`, and `obsidian daily:path` + `append` instead of `daily:append`.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@@ -254,3 +285,5 @@ obsidian command id="dataview:dataview-force-refresh-views"
|
|||||||
| Snap confinement issues | Snap restricts IPC | Use `.deb` package instead |
|
| Snap confinement issues | Snap restricts IPC | Use `.deb` package instead |
|
||||||
| Multi-vault `"Name" command` fails | Vault name matching issue | Omit vault name; target most recent vault |
|
| Multi-vault `"Name" command` fails | Vault name matching issue | Omit vault name; target most recent vault |
|
||||||
| `property:set` list value is a string | CLI stores value as-is | Edit frontmatter directly or use `eval` |
|
| `property:set` list value is a string | CLI stores value as-is | Edit frontmatter directly or use `eval` |
|
||||||
|
| Colon+params exit 127 (missing `.com`) | Outdated installer — `Obsidian.com` absent | Reinstall from [obsidian.md/download](https://obsidian.md/download) |
|
||||||
|
| Colon+params exit 127 (Git Bash / MSYS2) | Bash resolves `obsidian` to `.exe` not `.com` | Create `~/bin/obsidian` wrapper: `#!/bin/bash` / `/c/path/to/Obsidian.com "$@"` and add `export PATH="$HOME/bin:$PATH"` to `~/.bashrc` |
|
||||||
|
|||||||
Reference in New Issue
Block a user