From e30c0eb9ccea562efbd7f7e4704e06cab0872a67 Mon Sep 17 00:00:00 2001 From: pablo-mano Date: Fri, 27 Feb 2026 23:51:30 +0100 Subject: [PATCH] Add template:insert error message to docs Clarifies exact error returned when no file is active in Obsidian UI: "Error: No active editor. Open a file first." Co-Authored-By: Claude Sonnet 4.6 --- plugins/obsidian-cli/skills/obsidian-cli/SKILL.md | 2 +- .../skills/obsidian-cli/references/command-reference.md | 2 +- skills/obsidian-cli/SKILL.md | 2 +- skills/obsidian-cli/references/command-reference.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/obsidian-cli/skills/obsidian-cli/SKILL.md b/plugins/obsidian-cli/skills/obsidian-cli/SKILL.md index 0188557..23a4da6 100644 --- a/plugins/obsidian-cli/skills/obsidian-cli/SKILL.md +++ b/plugins/obsidian-cli/skills/obsidian-cli/SKILL.md @@ -210,7 +210,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback 6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`. 7. **`daily:prepend`** inserts content after frontmatter, not at byte 0. 8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`). -9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead. +9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead. ## Troubleshooting diff --git a/plugins/obsidian-cli/skills/obsidian-cli/references/command-reference.md b/plugins/obsidian-cli/skills/obsidian-cli/references/command-reference.md index 6136558..b1f4678 100644 --- a/plugins/obsidian-cli/skills/obsidian-cli/references/command-reference.md +++ b/plugins/obsidian-cli/skills/obsidian-cli/references/command-reference.md @@ -257,7 +257,7 @@ obsidian template:insert name="weekly-review" # Insert template into t - `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.) - Title and other variables can be passed as `key=value` for template rendering. -> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead. +> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a new file from a template, use `obsidian create path="..." template="..."` instead. --- diff --git a/skills/obsidian-cli/SKILL.md b/skills/obsidian-cli/SKILL.md index 0188557..23a4da6 100644 --- a/skills/obsidian-cli/SKILL.md +++ b/skills/obsidian-cli/SKILL.md @@ -210,7 +210,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback 6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`. 7. **`daily:prepend`** inserts content after frontmatter, not at byte 0. 8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`). -9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead. +9. **`template:insert`** inserts into the currently active file in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a file from a template via CLI, use `obsidian create path="..." template="..."` instead. ## Troubleshooting diff --git a/skills/obsidian-cli/references/command-reference.md b/skills/obsidian-cli/references/command-reference.md index 6136558..b1f4678 100644 --- a/skills/obsidian-cli/references/command-reference.md +++ b/skills/obsidian-cli/references/command-reference.md @@ -257,7 +257,7 @@ obsidian template:insert name="weekly-review" # Insert template into t - `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.) - Title and other variables can be passed as `key=value` for template rendering. -> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead. +> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. If no file is open, it returns `Error: No active editor. Open a file first.` To create a new file from a template, use `obsidian create path="..." template="..."` instead. ---