Files
bootstrap/bin/mosaic-wizard
Jason Woltje cdd3ca07be feat: add TypeScript installation wizard with @clack/prompts TUI
Replace bash mosaic-init with a modern 9-stage wizard:
- SOUL.md identity, USER.md profile, TOOLS.md configuration
- Runtime detection (Claude, Codex, OpenCode) + MCP setup
- Skills catalog with categorized selection
- Quick Start and Advanced modes
- HeadlessPrompter for --non-interactive and CI usage
- ConfigService abstraction layer for future DB migration
- Bundled as single dist/mosaic-wizard.mjs via tsdown
- mosaic init now prefers wizard when Node.js is available
- 30 tests covering stages, templates, and integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:22:44 -06:00

26 lines
834 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# mosaic-wizard — Thin shell wrapper for the bundled TypeScript wizard
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
# Look for the bundle in the installed location first, then the source repo
WIZARD_BIN="$MOSAIC_HOME/dist/mosaic-wizard.mjs"
if [[ ! -f "$WIZARD_BIN" ]]; then
WIZARD_BIN="$(cd "$(dirname "$0")/.." && pwd)/dist/mosaic-wizard.mjs"
fi
if [[ ! -f "$WIZARD_BIN" ]]; then
echo "[mosaic-wizard] ERROR: Wizard bundle not found." >&2
echo "[mosaic-wizard] Run 'pnpm build' in the mosaic-bootstrap repo, or re-install Mosaic." >&2
exit 1
fi
if ! command -v node >/dev/null 2>&1; then
echo "[mosaic-wizard] ERROR: Node.js is required but not found." >&2
echo "[mosaic-wizard] Install Node.js 18+ from https://nodejs.org" >&2
exit 1
fi
exec node "$WIZARD_BIN" "$@"