From a652d2875596b10785bf11d97e280354adc79e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9D=BE=E6=B6=9B?= Date: Sat, 25 Apr 2026 11:52:46 +0800 Subject: [PATCH 1/4] docs: clarify properties prefix rule and add CLI/Bases prerequisites obsidian-bases: - Document the asymmetric prefix rule: in `properties:` config block, frontmatter keys must use `note.` prefix or `displayName` is silently ignored (column header shows raw field name). In `order`, `filters`, `groupBy`, `sort`, the bare form still works. - Update Schema and Task Tracker / Reading List examples to show the `note.` prefix in `properties:` blocks. - Add a Prerequisite note: Bases is a core plugin and may need to be enabled in `core-plugins.json` for vaults that predate v1.9. - Add a Troubleshooting entry for the displayName-ignored symptom. obsidian-cli: - Add Prerequisites section: Obsidian on macOS has two version numbers (asar bundle auto-updates, installer does not). The in-app updater can report "latest" while installer is too old to ship the CLI binary. Document how to check the installer version and reinstall. - Add health check command and a fallback path for environments where the CLI isn't available. These are documentation-only changes informed by hands-on use that hit both gotchas (displayName silently ignored, CLI missing despite "latest version" prompt). --- skills/obsidian-bases/SKILL.md | 36 ++++++++++++++++++++++++++++------ skills/obsidian-cli/SKILL.md | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/skills/obsidian-bases/SKILL.md b/skills/obsidian-bases/SKILL.md index 7e84aa4..b6370c7 100644 --- a/skills/obsidian-bases/SKILL.md +++ b/skills/obsidian-bases/SKILL.md @@ -5,6 +5,10 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f # Obsidian Bases Skill +## Prerequisite + +Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always enabled by default** — particularly in vaults that predate v1.9. If `.base` files don't appear in the file tree or won't render, check that `.obsidian/core-plugins.json` contains `"bases": true`. Enable via Settings → Core plugins → Bases, or edit the JSON and reload the vault. + ## Workflow 1. **Create the file**: Create a `.base` file in the vault with valid YAML content @@ -31,13 +35,15 @@ filters: formulas: formula_name: 'expression' -# Configure display names and settings for properties +# Configure display names and settings for properties. +# IMPORTANT: keys in this section must use their fully-qualified form. +# Frontmatter properties need the `note.` prefix or the displayName is silently ignored. properties: - property_name: + note.property_name: # frontmatter property — MUST prefix with `note.` displayName: "Display Name" - formula.formula_name: + formula.formula_name: # formula reference — already prefixed displayName: "Formula Display Name" - file.ext: + file.ext: # file property — already prefixed displayName: "Extension" # Define custom summary formulas @@ -123,6 +129,8 @@ filters: 2. **File properties** - File metadata: `file.name`, `file.mtime`, etc. 3. **Formula properties** - Computed values: `formula.my_formula` +**Asymmetric prefix rule**: in `order`, `filters`, `groupBy`, and `sort`, a frontmatter property can be referenced bare (`author`) or prefixed (`note.author`). But in the top-level `properties:` configuration block (where `displayName` is set), frontmatter keys **must** use the `note.` prefix — bare keys are silently ignored and the raw field name will appear as the column header. See Troubleshooting for the symptom. + ### File Properties Reference | Property | Type | Description | @@ -302,7 +310,7 @@ formulas: priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))' properties: - status: + note.status: displayName: Status formula.days_until_due: displayName: "Days Until Due" @@ -351,7 +359,7 @@ formulas: year_read: 'if(finished_date, date(finished_date).year, "")' properties: - author: + note.author: displayName: Author formula.status_icon: displayName: "" @@ -476,6 +484,22 @@ formulas: 'if(due_date, (date(due_date) - today()).days, "")' ``` +**`displayName` ignored / column shows raw field name**: in the `properties:` configuration block, frontmatter keys must be prefixed with `note.`. Bare keys are silently ignored. + +```yaml +# WRONG - displayName ignored, column header shows "status" +properties: + status: + displayName: Status + +# CORRECT - column header shows "Status" +properties: + note.status: + displayName: Status +``` + +This asymmetry trips users up because `order`, `filters`, and `groupBy` all accept the bare form. The `properties:` block is the exception. + **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`. ```yaml diff --git a/skills/obsidian-cli/SKILL.md b/skills/obsidian-cli/SKILL.md index 0046c45..61b8c52 100644 --- a/skills/obsidian-cli/SKILL.md +++ b/skills/obsidian-cli/SKILL.md @@ -7,6 +7,42 @@ description: Interact with Obsidian vaults using the Obsidian CLI to read, creat Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open. +## Prerequisites + +The `obsidian` binary ships with the **installer**, not with the auto-updated asar bundle. If `which obsidian` returns nothing, the user is most likely missing one of these: + +1. **Installer is too old.** Obsidian on macOS has two version numbers: the asar bundle (shown in Settings → About) auto-updates, but the installer at `/Applications/Obsidian.app` does **not**. The in-app "check for updates" only covers the asar — it can report "you are on the latest version" while the installer is multiple versions behind. CLI binary requires installer ≥ 1.10. Check via: + + ```bash + defaults read /Applications/Obsidian.app/Contents/Info.plist CFBundleShortVersionString + ``` + + If old, download the latest from and reinstall (vault data is unaffected). + +2. **CLI not enabled.** Settings → General → Advanced → toggle "Enable command line interface" ON. This installs the shim to `/usr/local/bin/`. + +3. **PATH not refreshed.** Open a new terminal after enabling. + +### Health check + +```bash +which obsidian \ + && obsidian vault \ + && obsidian dev:screenshot path=/tmp/obs.png +``` + +If all three succeed, the CLI is ready. + +### Fallback when CLI is unavailable + +When the CLI cannot be installed (older Obsidian, restricted host, etc.), most vault operations are still doable via direct file access: + +- Read / edit notes: read or edit the `.md` file directly +- Toggle core plugins: edit `.obsidian/core-plugins.json` and ask the user to reload (`Cmd+P → Reload app without saving`) +- Open a file: `open "obsidian://open?vault=&file="` + +Note: direct file edits won't trigger Obsidian's index refresh until the vault reloads. + ## Command reference Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli From 47e9b1fde767845af6a4b22b13b0cfb3cc903e79 Mon Sep 17 00:00:00 2001 From: citizen204 Date: Fri, 5 Jun 2026 22:50:54 +0930 Subject: [PATCH 2/4] docs(obsidian-cli): add platform setup notes for WSL and headless Linux - WSL: use Obsidian.com (Electron console stub) instead of Obsidian.exe, which silently drops stdout/stderr on WSL due to GUI subsystem mismatch - Headless Linux: set DISPLAY to Xvfb display before running commands, otherwise CLI fails with 'unable to find Obsidian' Closes #93, closes #62 --- skills/obsidian-cli/SKILL.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/skills/obsidian-cli/SKILL.md b/skills/obsidian-cli/SKILL.md index 0046c45..0fa18ee 100644 --- a/skills/obsidian-cli/SKILL.md +++ b/skills/obsidian-cli/SKILL.md @@ -7,6 +7,24 @@ description: Interact with Obsidian vaults using the Obsidian CLI to read, creat Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open. +## Platform setup + +> [!info] WSL / Windows +> When invoking from WSL, point your wrapper at `Obsidian.com` (the Electron console stub), not `Obsidian.exe`. The `.exe` is a GUI-subsystem binary and silently drops stdout/stderr, so subcommands appear to succeed but produce no output: +> +> ```bash +> # ~/bin/obsidian +> "/mnt/c/Program Files/Obsidian/Obsidian.com" "$@" +> ``` + +> [!info] Headless Linux +> On Linux without a display (servers, Docker, CI), run Obsidian under Xvfb and set `DISPLAY` to match: +> +> ```bash +> Xvfb :99 -screen 0 1024x768x24 & +> DISPLAY=:99 obsidian version +> ``` + ## Command reference Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli From 086e1e95e929f559f901ff28843fbd073168c59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9D=BE=E6=B6=9B?= Date: Thu, 5 Nov 2026 11:20:50 +0800 Subject: [PATCH 3/4] docs: clarify empty Bases headers and refresh prerequisites --- skills/obsidian-bases/SKILL.md | 6 ++++-- skills/obsidian-cli/SKILL.md | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/skills/obsidian-bases/SKILL.md b/skills/obsidian-bases/SKILL.md index b6370c7..8608769 100644 --- a/skills/obsidian-bases/SKILL.md +++ b/skills/obsidian-bases/SKILL.md @@ -7,7 +7,7 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f ## Prerequisite -Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always enabled by default** — particularly in vaults that predate v1.9. If `.base` files don't appear in the file tree or won't render, check that `.obsidian/core-plugins.json` contains `"bases": true`. Enable via Settings → Core plugins → Bases, or edit the JSON and reload the vault. +Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always enabled by default** — particularly in vaults that predate v1.9. If `.base` files do not render as a database, enable Bases via Settings → Core plugins → Bases. ## Workflow @@ -362,7 +362,7 @@ properties: note.author: displayName: Author formula.status_icon: - displayName: "" + displayName: "Status" formula.reading_time: displayName: "Est. Time" @@ -500,6 +500,8 @@ properties: This asymmetry trips users up because `order`, `filters`, and `groupBy` all accept the bare form. The `properties:` block is the exception. +**Empty `displayName` does not hide a table header**: `displayName: ""` falls back to the property name, just like omitting `displayName`. For example, `formula.status_icon` displays `status_icon`. Use a non-empty name such as `displayName: "Status"` to customize the header. + **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`. ```yaml diff --git a/skills/obsidian-cli/SKILL.md b/skills/obsidian-cli/SKILL.md index 61b8c52..18c7b76 100644 --- a/skills/obsidian-cli/SKILL.md +++ b/skills/obsidian-cli/SKILL.md @@ -11,7 +11,7 @@ Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Ob The `obsidian` binary ships with the **installer**, not with the auto-updated asar bundle. If `which obsidian` returns nothing, the user is most likely missing one of these: -1. **Installer is too old.** Obsidian on macOS has two version numbers: the asar bundle (shown in Settings → About) auto-updates, but the installer at `/Applications/Obsidian.app` does **not**. The in-app "check for updates" only covers the asar — it can report "you are on the latest version" while the installer is multiple versions behind. CLI binary requires installer ≥ 1.10. Check via: +1. **Installer is too old.** Obsidian on macOS has two version numbers: the asar bundle (shown in Settings → About) auto-updates, but the installer at `/Applications/Obsidian.app` does **not**. The in-app "check for updates" only covers the asar — it can report "you are on the latest version" while the installer is multiple versions behind. The [official CLI installation guide](https://help.obsidian.md/cli) requires the 1.12 installer and recommends 1.12.7 or later. Check via: ```bash defaults read /Applications/Obsidian.app/Contents/Info.plist CFBundleShortVersionString @@ -19,7 +19,7 @@ The `obsidian` binary ships with the **installer**, not with the auto-updated as If old, download the latest from and reinstall (vault data is unaffected). -2. **CLI not enabled.** Settings → General → Advanced → toggle "Enable command line interface" ON. This installs the shim to `/usr/local/bin/`. +2. **CLI not enabled.** Settings → General → enable **Command line interface**, then follow the prompt to register the CLI. 3. **PATH not refreshed.** Open a new terminal after enabling. @@ -38,10 +38,10 @@ If all three succeed, the CLI is ready. When the CLI cannot be installed (older Obsidian, restricted host, etc.), most vault operations are still doable via direct file access: - Read / edit notes: read or edit the `.md` file directly -- Toggle core plugins: edit `.obsidian/core-plugins.json` and ask the user to reload (`Cmd+P → Reload app without saving`) +- Toggle core plugins: use Settings → Core plugins - Open a file: `open "obsidian://open?vault=&file="` -Note: direct file edits won't trigger Obsidian's index refresh until the vault reloads. +Allow Obsidian to detect external file changes before querying the updated content. ## Command reference From 48a7ca3f32cbccded6d93097e8380f7a053a5fb0 Mon Sep 17 00:00:00 2001 From: Steph Ango <10565871+kepano@users.noreply.github.com> Date: Wed, 11 Nov 2026 07:56:52 -0800 Subject: [PATCH 4/4] Skills: Trim the Bases prefix fix and add the WSL note From #84, keep the note. prefix rule for the properties section, the fixed examples, and the empty displayName fallback. Drop the CLI prerequisites, which overlap "Before using the CLI", and the claim that older vaults have Bases turned off. From #96, keep the WSL Obsidian.com note. Drop the headless Linux setup, because the CLI finds Obsidian's socket through XDG_RUNTIME_DIR, not DISPLAY. --- .../obsidian/skills/obsidian-bases/SKILL.md | 23 +++++++------------ plugins/obsidian/skills/obsidian-cli/SKILL.md | 2 ++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/plugins/obsidian/skills/obsidian-bases/SKILL.md b/plugins/obsidian/skills/obsidian-bases/SKILL.md index a126db7..1555444 100644 --- a/plugins/obsidian/skills/obsidian-bases/SKILL.md +++ b/plugins/obsidian/skills/obsidian-bases/SKILL.md @@ -5,10 +5,6 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f # Obsidian Bases Skill -## Prerequisite - -Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always enabled by default** — particularly in vaults that predate v1.9. If `.base` files do not render as a database, enable Bases via Settings → Core plugins → Bases. - ## Workflow 1. **Create the file**: Create a `.base` file in the vault with valid YAML content @@ -16,7 +12,7 @@ Bases is a **core plugin** introduced in Obsidian v1.9, but it is **not always e 3. **Add formulas** (optional): Define computed properties in the `formulas` section 4. **Configure views**: Add one or more views (`table`, `cards`, `list`, or `map`) with `order` specifying which properties to display 5. **Validate**: Verify the file is valid YAML with no syntax errors. Check that all referenced properties and formulas exist. Common issues: unquoted strings containing special YAML characters, mismatched quotes in formula expressions, referencing `formula.X` without defining `X` in `formulas` -6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below +6. **Test in Obsidian**: Open the `.base` file in Obsidian to confirm the view renders correctly. If it shows a YAML error, check quoting rules below. If it doesn't open as a base at all, check that Bases is turned on in Settings → Core plugins ## Schema @@ -37,14 +33,13 @@ formulas: formula_name: 'expression' # Configure display names and settings for properties. -# IMPORTANT: keys in this section must use their fully-qualified form. -# Frontmatter properties need the `note.` prefix or the displayName is silently ignored. +# Note properties need the `note.` prefix here, or the setting is ignored. properties: - note.property_name: # frontmatter property — MUST prefix with `note.` + note.property_name: displayName: "Display Name" - formula.formula_name: # formula reference — already prefixed + formula.formula_name: displayName: "Formula Display Name" - file.ext: # file property — already prefixed + file.ext: displayName: "Extension" # Define custom summary formulas @@ -134,7 +129,7 @@ filters: 2. **File properties** - File metadata: `file.name`, `file.mtime`, etc. 3. **Formula properties** - Computed values: `formula.my_formula` -**Asymmetric prefix rule**: in `order`, `filters`, `groupBy`, and `sort`, a frontmatter property can be referenced bare (`author`) or prefixed (`note.author`). But in the top-level `properties:` configuration block (where `displayName` is set), frontmatter keys **must** use the `note.` prefix — bare keys are silently ignored and the raw field name will appear as the column header. See Troubleshooting for the symptom. +In `order`, `filters`, `groupBy`, and `sort`, a note property can be written bare (`author`) or prefixed (`note.author`). In the top-level `properties:` section, always write `note.author`, because Obsidian ignores a bare key there and shows the raw name as the column header. ### File Properties Reference @@ -545,7 +540,7 @@ formulas: 'if(due_date, (date(due_date) - today()).days, "")' ``` -**`displayName` ignored / column shows raw field name**: in the `properties:` configuration block, frontmatter keys must be prefixed with `note.`. Bare keys are silently ignored. +**`displayName` ignored, column shows the raw name**: prefix note properties with `note.` in the `properties:` section. ```yaml # WRONG - displayName ignored, column header shows "status" @@ -559,9 +554,7 @@ properties: displayName: Status ``` -This asymmetry trips users up because `order`, `filters`, and `groupBy` all accept the bare form. The `properties:` block is the exception. - -**Empty `displayName` does not hide a table header**: `displayName: ""` falls back to the property name, just like omitting `displayName`. For example, `formula.status_icon` displays `status_icon`. Use a non-empty name such as `displayName: "Status"` to customize the header. +**Empty `displayName` doesn't hide a header**: `displayName: ""` falls back to the property name, the same as leaving it out, so `formula.status_icon` shows `status_icon`. Use a non-empty name such as `displayName: "Status"`. **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`. diff --git a/plugins/obsidian/skills/obsidian-cli/SKILL.md b/plugins/obsidian/skills/obsidian-cli/SKILL.md index c28232a..a72787f 100644 --- a/plugins/obsidian/skills/obsidian-cli/SKILL.md +++ b/plugins/obsidian/skills/obsidian-cli/SKILL.md @@ -11,6 +11,8 @@ Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Ob Run `obsidian help` to check availability. If the command is missing, explain how to turn on the CLI using https://help.obsidian.md/cli. The `obsidian` command ships with the Obsidian installer; don't install the unrelated npm package `obsidian-cli`. If it can't find Obsidian, ask the user to open the desktop app, then retry. In a sandboxed shell the same message can mean the sandbox blocked the CLI's local socket. +On WSL, run `Obsidian.com` from the Windows install folder, not `Obsidian.exe`. `Obsidian.com` is the console wrapper that prints the output; `Obsidian.exe` exits without printing anything. + The CLI exits with status 0 even when a command fails, so read its output before reporting that a command succeeded. Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax.