6 Commits

Author SHA1 Message Date
Steph Ango 48a7ca3f32 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.
2026-11-11 07:56:52 -08:00
Steph Ango 37a56a6a58 Merge pull request #96 from citizen204/docs/obsidian-cli-platform-notes
# Conflicts:
#	skills/obsidian-cli/SKILL.md
2026-11-11 07:56:10 -08:00
Steph Ango 15272076ad Merge pull request #84 from hst368/fix-properties-prefix-and-prereqs
# Conflicts:
#	skills/obsidian-cli/SKILL.md
2026-11-11 07:56:06 -08:00
黄松涛 086e1e95e9 docs: clarify empty Bases headers and refresh prerequisites 2026-11-05 11:20:50 +08:00
citizen204 47e9b1fde7 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
2026-06-05 22:50:54 +09:30
黄松涛 a652d28755 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).
2026-04-25 11:52:46 +08:00
2 changed files with 27 additions and 6 deletions
@@ -12,7 +12,7 @@ description: Create and edit Obsidian Bases (.base files) with views, filters, f
3. **Add formulas** (optional): Define computed properties in the `formulas` section 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 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` 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 ## Schema
@@ -32,9 +32,10 @@ filters:
formulas: formulas:
formula_name: 'expression' formula_name: 'expression'
# Configure display names and settings for properties # Configure display names and settings for properties.
# Note properties need the `note.` prefix here, or the setting is ignored.
properties: properties:
property_name: note.property_name:
displayName: "Display Name" displayName: "Display Name"
formula.formula_name: formula.formula_name:
displayName: "Formula Display Name" displayName: "Formula Display Name"
@@ -128,6 +129,8 @@ filters:
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc. 2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
3. **Formula properties** - Computed values: `formula.my_formula` 3. **Formula properties** - Computed values: `formula.my_formula`
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 ### File Properties Reference
| Property | Type | Description | | Property | Type | Description |
@@ -336,7 +339,7 @@ formulas:
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))' priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
properties: properties:
status: note.status:
displayName: Status displayName: Status
formula.days_until_due: formula.days_until_due:
displayName: "Days Until Due" displayName: "Days Until Due"
@@ -390,10 +393,10 @@ formulas:
year_read: 'if(finished_date, date(finished_date).year, "")' year_read: 'if(finished_date, date(finished_date).year, "")'
properties: properties:
author: note.author:
displayName: Author displayName: Author
formula.status_icon: formula.status_icon:
displayName: "" displayName: "Status"
formula.reading_time: formula.reading_time:
displayName: "Est. Time" displayName: "Est. Time"
@@ -537,6 +540,22 @@ formulas:
'if(due_date, (date(due_date) - today()).days, "")' 'if(due_date, (date(due_date) - today()).days, "")'
``` ```
**`displayName` ignored, column shows the raw name**: prefix note properties with `note.` in the `properties:` section.
```yaml
# WRONG - displayName ignored, column header shows "status"
properties:
status:
displayName: Status
# CORRECT - column header shows "Status"
properties:
note.status:
displayName: Status
```
**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`. **Referencing undefined formulas**: Ensure every `formula.X` in `order` or `properties` has a matching entry in `formulas`.
```yaml ```yaml
@@ -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. 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. 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. Quote parameters for the current shell, and pass note text as literal argument data, never as executable shell syntax.