mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 00:00:46 +00:00
632c8868bc
Adds a reverse proxy to `wmill dev` that serves the Windmill UI on localhost, enabling Claude Desktop/Preview to open dev pages. Each connected dev page can watch a specific file via the `path` URL param and `setWatch` WebSocket message. Key changes: - CLI: single-port proxy (default :3100) that forwards HTTP to remote Windmill, handles /ws_dev locally for dev file changes, and proxies /ws/* to remote - CLI: per-client watch filtering so multiple tabs can watch different files - CLI: flow broadcasts now include a `path` field - Frontend: Dev.svelte connects to same-origin /ws_dev when no port param, sends setWatch on connect, filters messages client-side as safety net - CLI init: generates .claude/skills/dev-preview/SKILL.md and .claude/launch.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
985 B
985 B
Dev Preview
Preview Windmill scripts and flows locally via wmill dev.
Setup
Start the dev server (includes a localhost reverse proxy):
wmill dev
This starts:
- A file watcher on the local repo
- A reverse proxy on
localhost:3100forwarding to the remote Windmill instance - A dev WebSocket on
/ws_devfor live file updates
Preview a specific file
Open in browser or Claude Preview:
http://localhost:3100/dev?path={wm_path}&local=true
Where wm_path is the Windmill path derived from the local file:
- Scripts: strip the file extension —
u/admin/my_script.ts→u/admin/my_script - Flows: strip the
.flow/suffix —f/my_flow.flow/flow.yaml→f/my_flow
The path parameter locks the preview to that file. Other file changes are ignored.
Switch files
Navigate to a new URL with a different path param.
Legacy mode
Without the path parameter, the dev page shows the last-edited file (original behavior).