fix: remove stale setup-wizard.sh references#198
Conversation
The shell-based setup-wizard.sh was migrated to TypeScript (packages/cli/src/setup-wizard.ts) but two references were left behind: - scripts/remote-install.sh: chmod on non-existent lib/setup-wizard.sh caused first-time installs to fail - lib/daemon.sh: called the removed shell script instead of the Node.js replacement when no configuration is found Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes the broken first-time install flow by removing the stale
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant remote-install.sh
participant daemon.sh
participant node as Node.js
participant setup-wizard.js as packages/cli/dist/setup-wizard.js
User->>remote-install.sh: curl | bash (fresh install)
remote-install.sh->>remote-install.sh: chmod +x bin/tinyclaw, tinyclaw.sh, scripts/install.sh, etc.
Note over remote-install.sh: ❌ chmod +x lib/setup-wizard.sh (REMOVED — file no longer exists)
remote-install.sh->>remote-install.sh: scripts/install.sh (symlink + PATH)
User->>daemon.sh: tinyclaw start (no settings.json)
daemon.sh->>daemon.sh: load_settings → rc ≠ 0
daemon.sh->>node: node $SCRIPT_DIR/packages/cli/dist/setup-wizard.js
node->>setup-wizard.js: Execute setup wizard (TypeScript compiled)
setup-wizard.js-->>User: Interactive setup prompts
setup-wizard.js-->>daemon.sh: settings.json written
daemon.sh->>daemon.sh: load_settings (success)
daemon.sh->>daemon.sh: Start tmux session + channel processes
|
| echo -e "${YELLOW}No configuration found. Running setup wizard...${NC}" | ||
| echo "" | ||
| "$SCRIPT_DIR/lib/setup-wizard.sh" | ||
| node "$SCRIPT_DIR/packages/cli/dist/setup-wizard.js" |
There was a problem hiding this comment.
Use existing $CLI variable instead of hardcoded path
tinyclaw.sh defines CLI="$SCRIPT_DIR/packages/cli/dist" at line 29, and since daemon.sh is sourced from tinyclaw.sh (line 26 of tinyclaw.sh), the $CLI variable is available here. The existing setup command in tinyclaw.sh already calls node "$CLI/setup-wizard.js" using this variable.
Hardcoding the full path creates a discrepancy — if the CLI dist path ever changes, this line would need to be updated separately from the canonical definition in tinyclaw.sh.
| node "$SCRIPT_DIR/packages/cli/dist/setup-wizard.js" | |
| node "$CLI/setup-wizard.js" |
Summary
Fixes #197 — first-time install fails because
lib/setup-wizard.shno longer exists (it was migrated to TypeScript).scripts/remote-install.sh: Removedchmod +x lib/setup-wizard.shwhich broke fresh installslib/daemon.sh: Updated to callnode .../setup-wizard.jsinstead of the removed shell scriptTest plan
remote-install.shon a clean machine — step 6/6 should no longer errorsettings.json— setup wizard should launch via Node.js🤖 Generated with Claude Code