Skip to content

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

fix(cli): move qmd index prompt to end of wizard

jessepinkman9900ac0be52475d9
diff --git a/bin/create.js b/bin/create.js
index d6e6ccd..fb6bbe1 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -277,26 +277,6 @@ async function main() {
targetName = answer
}
- const defaultQmdPath = join(
- process.env.XDG_CACHE_HOME || join(homedir(), ".cache"),
- "qmd", "index.sqlite"
- )
- const toDisplayPath = p => p.startsWith(homedir()) ? "~" + p.slice(homedir().length) : p
- const expandHome = p => p.startsWith("~/") || p === "~" ? join(homedir(), p.slice(1)) : p
- const displayQmdPath = toDisplayPath(defaultQmdPath)
- let qmdPath
- if (isInteractive) {
- const answer = await p.text({
- message: "Where to store the qmd index?",
- placeholder: displayQmdPath,
- defaultValue: displayQmdPath,
- })
- if (p.isCancel(answer)) { p.cancel("Setup cancelled."); process.exit(0) }
- qmdPath = expandHome(answer)
- } else {
- qmdPath = defaultQmdPath
- }
-
let remoteProvider = "none"
let repoName = null
let cfNamespace = "default"
@@ -334,6 +314,26 @@ async function main() {
}
}
+ const defaultQmdPath = join(
+ process.env.XDG_CACHE_HOME || join(homedir(), ".cache"),
+ "qmd", "index.sqlite"
+ )
+ const toDisplayPath = p => p.startsWith(homedir()) ? "~" + p.slice(homedir().length) : p
+ const expandHome = p => p.startsWith("~/") || p === "~" ? join(homedir(), p.slice(1)) : p
+ const displayQmdPath = toDisplayPath(defaultQmdPath)
+ let qmdPath
+ if (isInteractive) {
+ const answer = await p.text({
+ message: "Where to store the qmd index?",
+ placeholder: displayQmdPath,
+ defaultValue: displayQmdPath,
+ })
+ if (p.isCancel(answer)) { p.cancel("Setup cancelled."); process.exit(0) }
+ qmdPath = expandHome(answer)
+ } else {
+ qmdPath = defaultQmdPath
+ }
+
const targetDir = join(process.cwd(), targetName)
// Fail fast if target already exists