wizards 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +24 -13
  2. package/install.sh +144 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -20,21 +20,22 @@
20
20
  or a browser. Anything that changes an account asks first.
21
21
  - **Share it with a link.** Anyone can run a wizard in the browser, on a phone too: camera,
22
22
  code scan, voice notes, location and a drawn signature included. Results download as PDF,
23
- Word, HTML, Markdown, PNG, MP4, MP3, CSV, Excel or JSON, or go out as a link.
23
+ Word, HTML, Markdown, PNG, MP4, MP3, CSV, Excel or JSON, or go out as a link. Each wizard
24
+ wears a theme of your space: its colours, fonts and effects.
24
25
  - **Send the result on.** From the result, by email, into Google Drive, OneDrive or S3, to a
25
26
  Slack channel, through any connected service, or onto a website the wizard opens in its
26
27
  browser – you sign in yourself and confirm before anything goes public.
27
28
  - **Runs on your machine, on your subscription.** It uses Codex, Claude Code, Antigravity
28
29
  or Cursor Agent when one is installed and signed in, so no API key is needed. Or bring a key
29
- (Vercel AI Gateway, OpenAI, Anthropic), or a local model through Ollama. Your wizards and
30
+ (Vercel AI Gateway, OpenAI, Anthropic, Google), or a local model through Ollama. Your wizards and
30
31
  results stay in a folder on your machine.
31
32
 
32
33
  ## How it looks
33
34
 
34
- The studio: a wizard’s steps as a flow with its branches, next to the conversation that changes them.
35
+ The studio: the conversation that changes a wizard, next to its steps as a flow with its branches.
35
36
 
36
37
  <p align="center">
37
- <img src="docs/assets/studio.png" alt="The studio of engenty wizards: the flow of a wizard that collects a month's receipts for bookkeeping – two pages of questions, AI steps that branch to the inbox and to customer portals, a review and the result – with the conversation beside it">
38
+ <img src="docs/assets/studio.png" alt="The studio of engenty wizards: the assistant explains where a wizard that collects a month's receipts for bookkeeping looks for them; beside it the wizard's flow – two pages of questions, AI steps that branch to the mailbox and to customer portals, a review and the result">
38
39
  </p>
39
40
 
40
41
  A wizard in use: it asks on one page, then on the next, and ends with the result to download or share.
@@ -74,14 +75,14 @@ then walks you through the rest:
74
75
  `--local` leaves the account out: nothing leaves the computer, links answer on it only
75
76
  ([local only](https://engenty.ai/docs/user/local-only)).
76
77
  - **An AI client.** It looks for Codex, Claude Code, Antigravity and Cursor Agent and
77
- offers to install the missing ones – first the one whose app (Claude, ChatGPT, Cursor) is
78
- on your Mac, as its subscription is most likely yours already. The first page of the studio
78
+ offers to install the missing ones – first the one whose app (Claude, ChatGPT, Antigravity,
79
+ Cursor) is on your Mac, as its subscription is most likely yours already. The first page of the studio
79
80
  installs them too. Or use your account’s credits, an API key, [Ollama](https://ollama.com) or,
80
81
  on a Mac with Apple silicon and macOS 26, Apple Intelligence.
81
82
  - **A browser and ffmpeg** (optional): Chrome, Edge or Chromium (on a Mac also Brave) for PDF
82
83
  and PNG exports and for steps that use a browser, ffmpeg for MP4 videos of animated widgets.
83
84
  - **Start at login** (optional): engenty wizards starts in the background when you log in (a
84
- LaunchAgent on a Mac, a systemd user service on Linux). Links and AI clients then always
85
+ LaunchAgent on a Mac, a systemd user service on Linux, a scheduled task on Windows). Links and AI clients then always
85
86
  reach it. `wizards autostart on` or `off` switches it later.
86
87
  - **Your AI apps** (optional): adds your wizards to the AI apps it finds, such as Claude
87
88
  Desktop, Cursor or Codex. `wizards connect` and `wizards disconnect` do it later.
@@ -103,7 +104,8 @@ icon at the right of the address bar.
103
104
 
104
105
  ### From source
105
106
 
106
- You need Node.js 24.11 or newer and pnpm 10 (`corepack enable`).
107
+ You need Node.js 24.11 or newer and pnpm 10 (`corepack enable`; Node 25 and later ship without
108
+ corepack, so install it first with `npm install -g corepack`).
107
109
 
108
110
  ```bash
109
111
  git clone https://github.com/engenty/wizards.git
@@ -115,8 +117,8 @@ pnpm wizards
115
117
 
116
118
  pnpm may list “Ignored build scripts” – that’s expected, nothing to do.
117
119
 
118
- Code steps (shell, Node, Python) run in a sandbox when Docker and the sandbox image are on the
119
- machine; a checkout brings its own sandbox, the installed version has none yet.
120
+ Code steps (shell, Node, Python) run in a sandbox. `wizards sandbox add` installs one (about
121
+ 340 MB, no Docker needed); a checkout also uses Docker when the sandbox image is on the machine.
120
122
 
121
123
  ## First start
122
124
 
@@ -133,17 +135,22 @@ Change it later under Settings → Models.
133
135
  - **Make a wizard:** describe it in the studio’s chat, or start from one of the templates.
134
136
  You see the steps as a diagram and can change any of them.
135
137
  - **Run and share:** try it yourself, then share the link. Shared results are kept for 7 days
136
- for people without an account. “Teilen” on a result also sends it by email, saves it to a
138
+ for people without an account. “Share” on a result also sends it by email, saves it to a
137
139
  cloud folder or posts it: [Sharing a result](docs/development.md#sharing-a-result).
138
140
  - **Connect services:** Gmail, Google Drive, Calendar, Contacts, Outlook, OneDrive, Slack,
139
141
  GitHub, HubSpot and S3 are built in; any other service can be added from its API description
140
142
  or MCP server through the [integrations.sh](https://integrations.sh) registry. Services that
141
143
  sign in with OAuth need a few settings first: [Connectors](docs/development.md#connectors).
144
+ - **Give it a look:** under “Look” a wizard wears a theme of your space – colours, fonts and
145
+ effects – or ask the assistant, for example “Make it dark and spooky for Halloween.”
142
146
  - **Build from Claude Code or Codex:** Settings → Integrate adds engenty wizards to your AI
143
147
  apps (Claude Desktop, Claude Code, Codex, Cursor and others), or `wizards connect` from a
144
- terminal.
148
+ terminal. In Claude Code, the plugin also lists your wizards beside the chat:
149
+ `claude plugin marketplace add engenty/wizards`, then `claude plugin install wizards@engenty`.
145
150
 
146
- Your machine only answers on `localhost`. To let others open shared wizards, run it on a server.
151
+ Your machine only answers on `localhost`. To let others open shared wizards, sign in with your
152
+ account: every version that goes live also runs on engenty.ai, even while your computer is off.
153
+ Or run it on a server.
147
154
 
148
155
  ## Your data
149
156
 
@@ -156,6 +163,10 @@ Back up the folder; delete it to start over. Settings go into `~/.engenty/wizard
156
163
 
157
164
  ## Update
158
165
 
166
+ engenty wizards updates itself: it looks for a new version at start and once a day, downloads
167
+ it in the background and switches to it at the next start, never during a run.
168
+ `wizards autoupdate off` turns that off. To update now:
169
+
159
170
  ```bash
160
171
  wizards update
161
172
  ```
package/install.sh CHANGED
@@ -47,6 +47,7 @@ main() {
47
47
  LINK=1
48
48
  [ -n "${ENGENTY_WIZARDS_NO_LINK:-}" ] && LINK=0
49
49
  VERSION=""
50
+ REUSABLE=0
50
51
  while [ $# -gt 0 ]; do
51
52
  case "$1" in
52
53
  --yes | -y) YES=1 ;;
@@ -75,8 +76,11 @@ main() {
75
76
  LOCAL_BIN="$HOME/.local/bin"
76
77
 
77
78
  style
78
- trap 'printf "%s" "$SHOW"' EXIT
79
+ trap 'unlock; printf "%s" "$SHOW"' EXIT
79
80
  trap 'failed' ERR
81
+ # A signal ends it through the EXIT trap, which gives the lock back.
82
+ trap 'exit 130' INT
83
+ trap 'exit 143' TERM HUP
80
84
 
81
85
  command -v curl >/dev/null 2>&1 || die "curl is needed and was not found."
82
86
  command -v tar >/dev/null 2>&1 || die "tar is needed and was not found."
@@ -85,6 +89,7 @@ main() {
85
89
 
86
90
  banner
87
91
  printf '%s Installing into %s\n%s\n' "${GRAY}┌$RESET" "$BOLD$(tilde "$HOME_DIR")$RESET" "$BAR"
92
+ lock
88
93
  platform
89
94
  package
90
95
  node
@@ -95,6 +100,7 @@ main() {
95
100
  printf '%s %s\n\n' "${GRAY}└$RESET" "Installed. Next, a few questions to set it up."
96
101
  printf '%s' "$SHOW"
97
102
  trap - EXIT ERR
103
+ unlock
98
104
  # --local goes on to the setup: it is the setup's account step that keeps the install off
99
105
  # the account. The questions need a terminal; stdin may be the pipe this script came through.
100
106
  SETUP_ARGS=""
@@ -313,6 +319,7 @@ die() {
313
319
  [ "${TTY:-0}" = 1 ] && printf '\r\033[K'
314
320
  printf '%s %s\n' "${RED:-}■${RESET:-}" "$1" >&2
315
321
  trap - EXIT ERR
322
+ unlock
316
323
  exit 1
317
324
  }
318
325
 
@@ -378,6 +385,52 @@ download() {
378
385
  wait "$pid"
379
386
  }
380
387
 
388
+ # --- one install at a time ------------------------------------------------------------------
389
+
390
+ # An update the studio starts, `wizards update`, an install by hand and the runtime's own updates
391
+ # (autoupdate.ts) may come together; two of them in runtime/ at once leave a runtime with files
392
+ # missing. The lock is a folder, which only one of them can make, with its owner's pid in it.
393
+ # A second install waits for the first, then does its own.
394
+ LOCK_WAIT="${ENGENTY_WIZARDS_LOCK_WAIT:-900}"
395
+
396
+ lock() {
397
+ STEP="Waiting for the other install"
398
+ LOCK="$HOME_DIR/install.lock"
399
+ local waited=0 owner said=""
400
+ while ! mkdir "$LOCK" 2>/dev/null; do
401
+ owner="$(cat "$LOCK/pid" 2>/dev/null || true)"
402
+ # Its owner ended without giving it back (killed), or never wrote its pid.
403
+ if { [ -n "$owner" ] && ! kill -0 "$owner" 2>/dev/null; } ||
404
+ { [ -z "$owner" ] && [ "$waited" -ge 10 ]; }; then
405
+ rm -rf "$LOCK"
406
+ continue
407
+ fi
408
+ if [ "$waited" -ge "$LOCK_WAIT" ]; then
409
+ die "Another install (pid ${owner:-?}) is still running after ${LOCK_WAIT}s. Try again when it is done."
410
+ fi
411
+ if [ -z "$said" ]; then
412
+ printf '%s %s\n' "${MAGENTA}◒$RESET" "Another install is running (pid ${owner:-?}): waiting for it"
413
+ said=1
414
+ fi
415
+ sleep 1
416
+ waited=$((waited + 1))
417
+ done
418
+ printf '%s\n' "$$" >"$LOCK/pid"
419
+ LOCKED=1
420
+ [ -n "$said" ] && done_step "The other install is done"
421
+ return 0
422
+ }
423
+
424
+ # Gives the lock back, and takes along what this install left half done.
425
+ unlock() {
426
+ [ -z "${STAGE:-}" ] || rm -rf "$STAGE"
427
+ STAGE=""
428
+ if [ -n "${LOCKED:-}" ]; then
429
+ rm -rf "$LOCK"
430
+ LOCKED=""
431
+ fi
432
+ }
433
+
381
434
  # --- the steps -------------------------------------------------------------------------------
382
435
 
383
436
  platform() {
@@ -418,6 +471,31 @@ sha256_of() {
418
471
  fi
419
472
  }
420
473
 
474
+ # Whether the npm prefix $1 holds every package its package-lock.json names (the ones for other
475
+ # machines aside); what is missing goes to stdout.
476
+ complete() {
477
+ PREFIX="$1" "$NODE_DIR/bin/node" -e '
478
+ const { existsSync, readFileSync } = require("fs");
479
+ const { join } = require("path");
480
+ const prefix = process.env.PREFIX;
481
+ let packages;
482
+ try {
483
+ packages = JSON.parse(readFileSync(join(prefix, "package-lock.json"), "utf8")).packages;
484
+ } catch {
485
+ console.log("npm wrote no package-lock.json");
486
+ process.exit(1);
487
+ }
488
+ const missing = Object.entries(packages || {})
489
+ .filter(([where, p]) => where && !p.optional && !p.devOptional && !p.dev && !p.peer)
490
+ .filter(([where]) => !existsSync(join(prefix, where, "package.json")))
491
+ .map(([where]) => where);
492
+ if (missing.length || !Object.keys(packages || {}).length) {
493
+ console.log("missing", missing.length, "packages:", missing.slice(0, 20).join(" "));
494
+ process.exit(1);
495
+ }
496
+ '
497
+ }
498
+
421
499
  node() {
422
500
  STEP="Installing Node $NODE_VERSION"
423
501
  if [ -x "$NODE_DIR/bin/node" ] && [ "$("$NODE_DIR/bin/node" --version 2>/dev/null)" = "v$NODE_VERSION" ]; then
@@ -475,32 +553,83 @@ package() {
475
553
  die "Version $VERSION holds the package under its old name, $OLD_NAME. This installer installs 0.1.9 and newer."
476
554
  ;;
477
555
  0.[1-6].* | 0.7.[0-4]) SPEC="$RELEASES/download/v$VERSION/$LEGACY_NAME-$VERSION.tgz" ;;
478
- *) SPEC="$RELEASES/download/v$VERSION/$PACKAGE_FILE-$VERSION.tgz" ;;
556
+ *)
557
+ SPEC="$RELEASES/download/v$VERSION/$PACKAGE_FILE-$VERSION.tgz"
558
+ # Only a runtime under its name of now can start from the version before (see reuse).
559
+ REUSABLE=1
560
+ ;;
479
561
  esac
480
562
  }
481
563
 
564
+ # Fills the empty npm prefix $1 with the version that runs now, so npm only changes what is
565
+ # different instead of unpacking every package again. Only a prefix that holds the runtime under
566
+ # its name of now and nothing else qualifies; anything else, or a copy that fails, starts empty.
567
+ # The copy is a clone where the disk can (APFS on macOS, btrfs or XFS on Linux): next to no space.
568
+ reuse() {
569
+ local stage="$1" from
570
+ [ "$REUSABLE" = 1 ] || return 1
571
+ from="$HOME_DIR/runtime/current"
572
+ [ -d "$from/node_modules/$PACKAGE_NAME" ] && [ -f "$from/package-lock.json" ] || return 1
573
+ MANIFEST="$from/package.json" NAME="$PACKAGE_NAME" "$NODE_DIR/bin/node" -e '
574
+ const deps = Object.keys(require(process.env.MANIFEST).dependencies || {});
575
+ process.exit(deps.length === 1 && deps[0] === process.env.NAME ? 0 : 1);
576
+ ' >>"$LOG" 2>&1 || return 1
577
+ local clone="--reflink=auto"
578
+ if [ "$OS" = darwin ]; then clone="-c"; fi
579
+ if cp -R "$clone" "$from/." "$stage/" 2>>"$LOG" ||
580
+ { empty "$stage" && cp -R "$from/." "$stage/" 2>>"$LOG"; }; then
581
+ # The link for commands of 0.7.4 and older is written again after the install. Without the
582
+ # old lock npm resolves as for a fresh install, keeping what fits: from a lock it would also
583
+ # add the packages for the other libc.
584
+ rm -f "$stage/node_modules/$LEGACY_NAME" "$stage/package-lock.json"
585
+ return 0
586
+ fi
587
+ empty "$stage"
588
+ return 1
589
+ }
590
+
591
+ empty() {
592
+ find "$1" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
593
+ }
594
+
482
595
  runtime() {
483
596
  STEP="Installing engenty wizards"
484
- local dir="$HOME_DIR/runtime" stage previous path
597
+ local dir="$HOME_DIR/runtime" stage previous path old
485
598
  # An install of the package under its old name is replaced, not kept beside the new one.
486
599
  if [ -d "$dir/node_modules/$OLD_NAME" ]; then
487
600
  rm -rf "$dir"
488
601
  fi
489
602
  mkdir -p "$dir"
603
+ # What an install that was stopped halfway left: its npm prefix, or a version it was replacing.
604
+ # Old enough that no installer from before the lock is still writing into it.
605
+ find "$dir" -maxdepth 1 -name '.staging-*' -mmin +30 -exec rm -rf {} + 2>/dev/null || true
490
606
  # Each version has its folder (runtime/<version>/, an npm prefix); `current` names the one the
491
607
  # command starts, and a version that runs keeps its files. npm is a script that asks for
492
608
  # `node`: ours comes first on the PATH. No install scripts run; the runtime works without
493
609
  # them. --legacy-peer-deps: no peers on top, which nothing here uses (about 70 MB less).
494
610
  stage="$(mktemp -d "$dir/.staging-XXXXXX")"
495
- spin "Installing engenty wizards (about 650 MB on disk, a minute or two)" \
611
+ STAGE="$stage"
612
+ local what="Installing engenty wizards (about 650 MB on disk, a minute or two)"
613
+ if reuse "$stage"; then
614
+ what="Updating engenty wizards to $VERSION (only what changed)"
615
+ fi
616
+ if ! spin "$what" \
496
617
  env PATH="$NODE_DIR/bin:$PATH" "$NODE_DIR/bin/npm" install --prefix "$stage" \
497
- --omit=dev --ignore-scripts --legacy-peer-deps --no-audit --no-fund --loglevel=error "$SPEC"
618
+ --omit=dev --ignore-scripts --legacy-peer-deps --no-audit --no-fund --loglevel=error "$SPEC"; then
619
+ rm -rf "$stage"
620
+ failed
621
+ fi
622
+ # npm stopped halfway leaves packages out; only a whole install takes a version's place.
623
+ if ! complete "$stage" >>"$LOG" 2>&1; then
624
+ rm -rf "$stage"
625
+ die "npm did not install everything engenty wizards needs (the log names what is missing). Run the installer again."
626
+ fi
498
627
  # The runtime under its name, or under the one it had up to 0.7.4 (`--version 0.7.4`). The
499
628
  # package `wizards` of now is only the launcher: no runtime in it.
500
629
  if [ -f "$stage/node_modules/$PACKAGE_NAME/package.json" ]; then
501
630
  PACKAGE="$PACKAGE_NAME"
502
631
  # A command or an update of 0.7.4 or older looks for the runtime under its old name.
503
- ln -s "$PACKAGE_NAME" "$stage/node_modules/$LEGACY_NAME"
632
+ ln -sfn "$PACKAGE_NAME" "$stage/node_modules/$LEGACY_NAME"
504
633
  elif [ -d "$stage/node_modules/$LEGACY_NAME/apps/runtime" ]; then
505
634
  PACKAGE="$LEGACY_NAME"
506
635
  else
@@ -514,9 +643,17 @@ runtime() {
514
643
  rm -rf "$dir/node_modules" "$dir/package.json" "$dir/package-lock.json"
515
644
  fi
516
645
  previous="$(readlink "$dir/current" 2>/dev/null || true)"
517
- rm -rf "${dir:?}/$INSTALLED"
646
+ # The version that is there already steps aside in one move and goes once the new one is in,
647
+ # so the folder holds one whole runtime or the other, never half of one.
648
+ old=""
649
+ if [ -e "$dir/$INSTALLED" ]; then
650
+ old="$(mktemp -d "$dir/.staging-XXXXXX")"
651
+ mv "$dir/$INSTALLED" "$old/"
652
+ fi
518
653
  mv "$stage" "$dir/$INSTALLED"
654
+ STAGE=""
519
655
  ln -sfn "$INSTALLED" "$dir/current"
656
+ [ -z "$old" ] || rm -rf "$old"
520
657
  # For a command written before the version folders (an older bin/wizards or npx wizards).
521
658
  ln -sfn "current/node_modules" "$dir/node_modules"
522
659
  # This version and the one before stay; older ones go.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wizards",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have.",
5
5
  "license": "FSL-1.1-MIT AND CC-BY-4.0",
6
6
  "homepage": "https://engenty.ai",