Wrangler: workflows commands now support --local for local development
Key Points
- wrangler workflows supports --local
- Manage workflow lifecycle locally
- --port to target specific dev session
Summary
All wrangler workflows commands now accept a --local flag to target a Workflow running in a local wrangler dev session instead of the production API. This enables full local lifecycle management — triggering workflows, listing and controlling instances, and sending events — without deploying to Cloudflare. Commands also accept --port to target a specific dev session (default: 8787).
Key Points
- Add
--localto anywrangler workflowscommand to operate against a localwrangler devsession. - Supported actions include:
list,trigger,instances list,instances pause|resume|restart|terminate, andinstances send-event. - Use
--port <port>to target a non-default dev session (default:8787). - Example usages:
npx wrangler workflows trigger my-workflow --localornpx wrangler workflows instances pause my-workflow <INSTANCE_ID> --local. - Ensure a
wrangler devsession is running and accessible before using--local.
Practical notes
- This is ideal for iterative development and debugging without impacting production.
- When sending events locally, include
--type <event-type>withinstances send-event. - Refer to the Workflows local development docs for additional details and edge cases.