Lines 1-64javascript
2// ensure-siblings.mjs — set up the helper tools wicked-interactive needs (ADR-0016).
4// Run once at startup by the `serve` skill. For each MISSING sibling it runs the real
5// install command — transparently: every command is printed before it runs, so the user
6// always sees exactly what's happening on their machine. Nothing is installed silently.
8// node bin/ensure-siblings.mjs # auto-install anything missing
9// node bin/ensure-siblings.mjs --check # report only, install nothing
10// WI_NO_AUTOINSTALL=1 node … # same as --check (opt out of auto-install)
12// Cross-platform: spawnSync(..., { shell:true }) resolves `claude`/`npx` via PATH on
13// macOS, Linux, and Windows.
15import { spawnSync } from "node:child_process";
16import { preflight, playwrightInstalled } from "../src/service/preflight.js";
18// Playwright (ADR-0018) powers demo recording. It's an npm dependency, not a Claude plugin,
19// so it installs differently: pull the package + browser binaries, then the skills (the
20// supervising agent uses these to learn the target app). `playwright-cli install --skills`
21// relies on the softlinked skill dirs in the standard locations.
22const PLAYWRIGHT_STEPS = [
23 "npm install playwright",
24 "npx playwright install",
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
bin/ensure-siblings.mjsView on unpkg · L11 25 "playwright-cli install --skills",
28// Each sibling installs differently — an ordered list of shell commands per tool.
29// garden → Claude Code plugin (marketplace add, then install)
30// brain → npm package, run via npx
31// (wicked-prezzie was absorbed into wicked-interactive — ADR-0020 — so it's no longer a
32// sibling. wicked-bus is a hard npm dependency of this package; the serve skill seeds it.)
33const INSTALL_STEPS = {
35 "claude plugin marketplace add mikeparcewski/wicked-garden",
36 "claude plugin install wicked-garden",
39 "npx -y wicked-brain",
44 console.log(` $ ${cmd}`);
45 return spawnSync(cmd, { stdio: "inherit", shell: true }).status === 0;
48const checkOnly = process.argv.includes("--check") || process.env.WI_NO_AUTOINSTALL === "1";
51const pwMissing = !playwrightInstalled();
52if (pf.ok && !pwMissing) {
53 console.log("Helper tools: all present. Nothing to install.");
57const wanted = [...pf.missing, ...(pwMissing ? ["playwright (demo recorder)"] : [])];
58console.log(`wicked-interactive needs ${wanted.length} helper tool(s): ${wanted.join(", ")}`);
61 console.log("\nAuto-install is off. Install these yourself, then restart:");
62 if (pf.install_hint) console.log(pf.install_hint);
63 if (pwMissing) console.log(pf.playwright.install_hint);