Local Development
Workflows support local development using Wrangler, the command-line interface for Workers. Wrangler runs an emulated version of Workflows compared to the one that Cloudflare runs globally.
To develop locally with Workflows, you will need:
-
Wrangler v3.89.0 ↗ or later.
-
Node.js version of
18.0.0
or later. Consider using a Node version manager like Volta ↗ or nvm ↗ to avoid permission issues and change Node versions. -
If you are new to Workflows and/or Cloudflare Workers, refer to the Workflows Guide to install
wrangler
and deploy their first Workflows.
Open your terminal and run the following commands to start a local development session:
Start a local dev session
Local development sessions create a standalone, local-only environment that mirrors the production environment Workflows runs in so you can test your Workflows before you deploy to production.
Refer to the wrangler dev
documentation to learn more about how to configure a local development session.
Wrangler does not support npx wrangler dev --remote
.
Wrangler Workflow commands npx wrangler workflow [cmd]
are not supported for local development, as they target production API.