Files
windmill/system_prompts/base/dev-preview.md
Guilhem Lemouel 632c8868bc feat(cli): add localhost reverse proxy to wmill dev for Claude Desktop preview
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>
2026-03-24 22:45:37 +01:00

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:3100 forwarding to the remote Windmill instance
  • A dev WebSocket on /ws_dev for 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.tsu/admin/my_script
  • Flows: strip the .flow/ suffix — f/my_flow.flow/flow.yamlf/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).