Skip to content

feat: v0.0.1-beta.4 — Local dev, clone, zero-install Windows#2

Merged
vikasiwp merged 7 commits into
mainfrom
fix/release-notify-first-run
May 23, 2026
Merged

feat: v0.0.1-beta.4 — Local dev, clone, zero-install Windows#2
vikasiwp merged 7 commits into
mainfrom
fix/release-notify-first-run

Conversation

@vikasiwp
Copy link
Copy Markdown
Contributor

@vikasiwp vikasiwp commented Apr 12, 2026

Summary

v0.0.1-beta.4 — Zero-install Windows support

  • Bundled rsync.exe + msys2-runtime DLLs and BusyBox-w64 (awk provider) in bin/win32/. local clone, local push/pull, and sync push/pull now work on Windows out of the box — no Git for Windows / cwRsync prerequisite.
  • Replaced external sqlite3 CLI with better-sqlite3 Node module.
  • New scripts/fetch-windows-binaries.sh (maintainer-only) refreshes the bundle from MSYS2 + frippery.org.
  • 32 new tests cover path conversion and bundled-binary resolution.

Windows bug fixes

  • local clone: mysql2sqlite script path resolution (fileURLToPath instead of URL.pathname).
  • local clone: awk invoked explicitly (no shebang reliance).
  • rsync: Windows drive paths (C:\foo) converted to msys style (/c/foo) so rsync doesn't interpret C: as a hostname.
  • rsync: -e ssh -i ... command uses forward-slashed, quoted key paths so msys/cygwin sh parses them correctly.
  • Eliminated SQL injection risk in local clone's URL search-replace (bound params via better-sqlite3).

v0.0.1-beta.3 (also included in this PR)

Local Development (WordPress Playground)

  • local create — spin up local WordPress sites (zero Docker, uses WASM PHP + SQLite)
  • local clone <cloud-site> — full clone from InstaWP cloud (files + MySQL→SQLite DB import)
  • local start/stop — foreground or --background mode with PID tracking
  • local push/pull — incremental rsync between local and cloud sites
  • local list — shows running/stopped status and file path
  • local delete — clean removal

Clone Flow

  • MySQL dump export via SSH → convert with mysql2sqlite → import into SQLite
  • Table prefix rename (iwp576f_wp_) including meta keys and option names
  • Full URL search-replace across all tables (cloud URL → localhost)
  • AST SQLite driver (WP_SQLITE_AST_DRIVER=true) for WooCommerce compatibility
  • Auto-login via Playground blueprint login step with actual admin username
  • Non-core root files (CLAUDE.md, .htaccess, etc.) pulled alongside wp-content

Site Management

  • sites php <site> — view/update PHP version and settings
  • sites update <site> — update label, description, expiration
  • create --wp <version> — WordPress version selection
  • sites list — 50 per page default, --all flag, pagination hints

Teams

  • teams switch <team> — client-side team context (injects team_id on all API calls)

Cross-Platform (initial Windows fixes)

  • SSH key generation: removed /bin/sh and yes | pipe
  • whichwhere on Windows for command detection
  • Skip stty sane on Windows
  • --api flag fix: extracted from passthrough args so it works at any position

Other

  • Site resolver: 10-minute cache for name→ID lookups
  • rsync: --itemize-changes (only shows actually changed files)
  • Login: shows user name and team after success
  • Magic login URL: fixed to use /wordpress-auto-login?site={hash}
  • Terminal reset: stty sane after Playground exits (macOS/Linux)

Test plan

  • 168 unit tests passing
  • macOS: instawp local create / local clone <site> / local push|pull
  • Windows: instawp local clone <site> (verifies bundled rsync + busybox)
  • Windows: instawp sync push <site> (verifies bundled rsync via SSH)
  • Windows: instawp exec <site> --api and SSH key generation
  • npm publish: tarball includes bin/win32/** (verified via npm pack --dry-run)

🤖 Generated with Claude Code

vikasprogrammer and others added 3 commits March 23, 2026 20:23
- Local dev: create, clone, start, stop, push, pull, list, delete
- Clone flow: full site clone from InstaWP cloud (files + MySQL→SQLite DB)
- Background mode: --background flag with PID tracking and local stop
- Teams: client-side team switch with team_id injection on all API calls
- Sites list: 50 per page default, --all flag, pagination hints
- Site resolver: 10-minute cache for name→ID lookups
- Rsync: --itemize-changes (only shows changed files)
- Auto-login: finds first admin user, works with cloned sites
- AST SQLite driver: WP_SQLITE_AST_DRIVER=true for WooCommerce compat
- Vendor: mysql2sqlite (MIT, dumblob/mysql2sqlite) for DB conversion
- Terminal: stty sane after Playground exits

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ments

- Windows: fix ssh-keygen (remove /bin/sh, yes pipe), use where instead of which
- Windows: skip stty sane, platform-specific rsync install messages
- exec/wp: fix --api flag being swallowed by passThroughOptions
- sites php: view and update PHP version/settings via PATCH endpoint
- sites update: update site label, description, expiration
- create: add --wp flag for WordPress version selection
- login: show user name and team after successful login
- magic login: fix URL to use /wordpress-auto-login?site={hash}
- local clone: add --force to overwrite existing, --include for rsync patterns
- local pull: add --include flag for rsync patterns
- local stop: new command to stop background servers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 12, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 12, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 12, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Apr 12, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Bundles rsync.exe + msys2-runtime DLLs and BusyBox-w64 (awk provider) in
bin/win32/ so `local clone`, `local push/pull`, and `sync push/pull` work on
Windows out of the box. Replaces the external sqlite3 CLI dependency with the
better-sqlite3 Node module.

Fixes:
- local clone: mysql2sqlite path resolution (fileURLToPath, not URL.pathname)
- local clone: awk invoked explicitly (no shebang reliance)
- rsync: Windows drive paths converted to msys style (C:\\ -> /c/)
- rsync: -e ssh command uses forward-slashed, quoted key paths
- SQL injection risk in URL search-replace eliminated via bound params

Adds scripts/fetch-windows-binaries.sh (maintainer-only) to refresh the
Windows bundle from MSYS2 + frippery.org. 32 new tests cover path conversion
and bundled-binary resolution; full suite 168 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented May 22, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@vikasiwp vikasiwp changed the title feat: v0.0.1-beta.3 — Local dev, clone, cross-platform, PHP settings feat: v0.0.1-beta.4 — Local dev, clone, zero-install Windows May 22, 2026
@vikasiwp vikasiwp merged commit 3ac6632 into main May 23, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants