Skip to content

Fastest way to scaffold your LLM powered personal knowledge base - Obsidian, Claude Code, qmd, Github

fix(scaffold): create .qmd/ before opening qmd store

jessepinkman9900abfb1ffedcff
diff --git a/.claude/skills/pack-test/SKILL.md b/.claude/skills/pack-test/SKILL.md
index 6454b97..28f7032 100644
--- a/.claude/skills/pack-test/SKILL.md
+++ b/.claude/skills/pack-test/SKILL.md
@@ -60,6 +60,9 @@ VAULT_A=~/.claude-second-brain/test-brain-a
# .gitignore renamed from .gitignore.template
[ -f "$VAULT_A/.gitignore" ] && echo "PASS: .gitignore present" || echo "FAIL: .gitignore missing"
+# qmd:setup actually created the sqlite db (not just a non-fatal warning)
+[ -f "$VAULT_A/.qmd/index.sqlite" ] && echo "PASS: qmd:setup created index.sqlite" || echo "FAIL: qmd:setup did not create .qmd/index.sqlite"
+
# Wiki stubs, raw-sources dirs, local skills, scripts
ls $VAULT_A/wiki/ $VAULT_A/raw-sources/ $VAULT_A/.claude/skills/ $VAULT_A/scripts/qmd/
diff --git a/.github/workflows/pack-test.yml b/.github/workflows/pack-test.yml
index 3df6234..3602069 100644
--- a/.github/workflows/pack-test.yml
+++ b/.github/workflows/pack-test.yml
@@ -66,6 +66,7 @@ jobs:
check "package.json" "$VAULT/package.json"
check "CLAUDE.md" "$VAULT/CLAUDE.md"
check "mise.toml" "$VAULT/mise.toml"
+ check ".qmd/index.sqlite (qmd:setup succeeded)" "$VAULT/.qmd/index.sqlite"
check "~/.claude-second-brain/config.toml" "$HOME/.claude-second-brain/config.toml"
check "~/.claude/skills/brain-ingest/SKILL.md" "$HOME/.claude/skills/brain-ingest/SKILL.md"
check "~/.claude/skills/brain-search/SKILL.md" "$HOME/.claude/skills/brain-search/SKILL.md"
diff --git a/template/scripts/qmd/reindex.ts b/template/scripts/qmd/reindex.ts
index 4429768..7e3b408 100644
--- a/template/scripts/qmd/reindex.ts
+++ b/template/scripts/qmd/reindex.ts
@@ -11,6 +11,7 @@
*/
import { createStore } from "@tobilu/qmd"
+import { mkdir } from "node:fs/promises"
import { dirname, join } from "node:path"
import { fileURLToPath } from "node:url"
@@ -18,6 +19,7 @@ const VAULT = join(dirname(fileURLToPath(import.meta.url)), "../..")
const DB = join(VAULT, ".qmd", "index.sqlite")
try {
+ await mkdir(dirname(DB), { recursive: true })
const store = await createStore({ dbPath: DB })
console.log("Updating file index...")
diff --git a/template/scripts/qmd/setup.ts b/template/scripts/qmd/setup.ts
index aaaa3e7..624de6d 100644
--- a/template/scripts/qmd/setup.ts
+++ b/template/scripts/qmd/setup.ts
@@ -10,6 +10,7 @@
*/
import { createStore } from "@tobilu/qmd"
+import { mkdir } from "node:fs/promises"
import { dirname, join } from "node:path"
import { fileURLToPath } from "node:url"
@@ -17,6 +18,7 @@ const VAULT = join(dirname(fileURLToPath(import.meta.url)), "../..")
const DB = join(VAULT, ".qmd", "index.sqlite")
try {
+ await mkdir(dirname(DB), { recursive: true })
const store = await createStore({ dbPath: DB })
// --- Collections (idempotent) ---