Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

Automatic Worker Deploy Configuration: Framework Detection, Setup, and Builds

How Wrangler detects your web framework, generates wrangler.jsonc, deploys without a config file, and how Workers Builds opens configuration pull requests.

This page summarizes Cloudflare Workers documentation on automatic project configuration: running wrangler deploy or wrangler setup when the repo has no wrangler.toml, wrangler.json, or wrangler.jsonc, so Wrangler can detect your stack, install adapters, write configuration, and deploy. Minimum Wrangler version for the default “no config” flow is 4.68.0 (see Deploy an existing project).

wrangler deploy without a config file: what happens

Section titled “wrangler deploy without a config file: what happens”

If you deploy an existing app and do not yet have a Wrangler configuration file, wrangler deploy can configure the project for you instead of failing.

You can now deploy any existing project to Cloudflare Workers — even without a Wrangler configuration file — and wrangler deploy will just work.

— Cloudflare, No config? No problem. Just wrangler deploy

From Wrangler 4.68.0 onward, a deploy in a directory without a Wrangler file typically:

  1. Detects the framework from package.json
  2. Prompts you to confirm detected settings (locally)
  3. Installs required Cloudflare adapters
  4. Generates wrangler.jsonc
  5. Deploys to Cloudflare Workers

Framework guides describe the same one-liner, for example Astro on Workers, SvelteKit, Nuxt, and Analog.

npx wrangler deploy

Automatic configuration is now the default behavior (previously introduced as experimental in December 2025). See the background in the GA changelog.

How automatic configuration works step by step

Section titled “How automatic configuration works step by step”

Deploy an existing project lists what Wrangler does when you run wrangler deploy or wrangler setup without an existing Wrangler file:

  • Detect your framework — analyzes the project
  • Prompt for confirmation — shows detected settings before changing files (local CLI)
  • Install adapters — e.g. @astrojs/cloudflare for Astro
  • Generate configuration — creates wrangler.jsonc with framework-appropriate main, assets, compatibility_flags, and observability
  • Update package.json — adds scripts such as deploy, preview, and cf-typegen
  • Configure git — adds entries for .wrangler and .dev-vars* to .gitignore

If a valid Wrangler file already exists, automatic configuration does not run. To reconfigure, delete the existing file and run wrangler deploy or wrangler setup again (configuration already exists).

wrangler setup: configure without deploying

Section titled “wrangler setup: configure without deploying”

Use wrangler setup when you want generated files in git before a live deploy—common for review or CI.

You can also configure your application without deploying it by using the new npx wrangler setup command. This enables you to easily review what changes we are making so your application is ready for Cloudflare Workers.

— Cloudflare, Configure your framework for Cloudflare automatically

Useful variants from Deploy an existing project:

Goal Command
Interactive setup, no deploy npx wrangler setup
Preview planned changes only npx wrangler setup --dry-run
Accept detected settings (CI/non-interactive) npx wrangler setup --yes

After wrangler setup, deploy with the generated script (npm run deploy, etc.) if present, or wrangler deploy when there is no package.json (skip configuration confirmation).

The setup command reference notes optional --build to run the project build command once configuration is applied.

Supported frameworks and generated wrangler.jsonc

Section titled “Supported frameworks and generated wrangler.jsonc”

Deploy an existing project documents supported frameworks and typical adapter or preset choices. Examples include Next.js (vinext path by default), Astro (@astrojs/cloudflare), SvelteKit (@sveltejs/adapter-cloudflare), Nuxt (Cloudflare preset), React Router and TanStack Start (Cloudflare Vite plugin), Solid Start, Angular, Analog, Vite, Vike, Waku, and static sites (directory with index.html).

Automatic configuration also supports static sites by detecting the assets directory and build command. From a single index.html file to the output of a generator like Jekyll or Hugo, you can just run npx wrangler deploy –x-autoconfig to upload to Cloudflare.

— Cloudflare, Configure your framework for Cloudflare automatically

Early experimental docs used npx wrangler deploy --x-autoconfig; GA docs center on plain wrangler deploy from 4.68.0+ (No config? No problem).

Generated wrangler.jsonc usually includes schema reference, Worker name, main entry, compatibility_date, compatibility_flags (often nodejs_compat for full-stack frameworks), an assets block with directory and sometimes binding: ASSETS, and observability.enabled: true. Exact paths differ by framework—for Astro SSR, docs show main at ./dist/_worker.js/index.js and assets under ./dist (Deploy an existing Astro project on Workers).

Automatic configuration uses vinext as the default Next.js path on Workers. For OpenNext, configure manually per OpenNext adapter—automatic setup will not choose OpenNext for you (Next.js configuration).

If Astro uses on-demand rendering (SSR), you need the Cloudflare adapter; autoconfig runs astro add cloudflare and sets output: 'server'. Static Astro sites do not need the adapter—you can upload static build output instead (Astro’s build configuration). For SSR, also add .assetsignore in public/ with _worker.js and _routes.json when following manual Astro steps.

Static asset deploy without wrangler.jsonc

Section titled “Static asset deploy without wrangler.jsonc”

For a built static directory only, you can deploy without writing flags by hand:

When you run wrangler deploy [directory] or wrangler deploy –assets [directory] without an existing configuration file, Wrangler CLI now guides you through the deployment process with interactive prompts.

— Cloudflare, Deploy static sites to Workers without a configuration file

wrangler deploy dist

Wrangler can confirm static-only deploy, ask for a project name, set compatibility_date to today, and write a minimal wrangler.jsonc with an assets.directory (example workflow). This path is separate from full-stack framework detection but uses the same “generate config, then reuse it” pattern.

Workers Builds: automatic configuration pull requests

Section titled “Workers Builds: automatic configuration pull requests”

Connecting a Git repo without a Wrangler file triggers autoconfig in CI. Workers Builds documents the flow:

When you connect a repository that does not have a Wrangler configuration file, autoconfig runs to detect your framework and create a pull request to configure your project for Cloudflare Workers.

— Cloudflare, Builds

Steps: detect framework → open a PR with configuration → preview deployment → after merge, normal deploys (automatic configuration for new projects).

A configuration PR is only created when your deploy command is npx wrangler deploy. If you have a custom deploy command, autoconfig will still run and configure your project, but no PR will be created.

— Cloudflare, Automatic pull requests

Artifacts repositories do not get automatic PRs—prepare configuration before connecting (Automatic pull requests, Builds).

When Wrangler configuration is not committed to version control, every Workers Builds run must execute autoconfig before the real deploy. Cloudflare describes the cost:

every build has to run autoconfig first, which means your project gets built twice - once during autoconfig to generate the configuration, and again for the actual deployment.

— Cloudflare, Automatic pull requests

Merging commits wrangler.jsonc, adapter changes, package.json scripts, lockfile updates, .gitignore, and sometimes .assetsignore (what the PR includes). The PR description lists detected settings, a preview link, and next steps (PR description).

Workers Builds may also open a name conflict PR if the dashboard Worker name and name in Wrangler config disagree (name conflict PR).

Dashboard import runs autoconfig non-interactively and follows the same PR pattern (importing a repository from the dashboard).

Dashboard vs Wrangler file: source of truth

Section titled “Dashboard vs Wrangler file: source of truth”

Mixing dashboard-edited settings with CLI deploys can cause surprises. Cloudflare recommends one source of truth:

Cloudflare recommends choosing and using one source of truth, the dashboard or the Wrangler configuration file, to avoid errors in your project.

— Cloudflare, C3 & Wrangler

From Wrangler v4.50.0+, wrangler deploy can show differences between local Wrangler config and remote dashboard settings and offer to update the local file; purely additive overrides may proceed without prompting (Better local deployment flow).

For Cloudflare Pages with dashboard-only settings and no Wrangler file, wrangler pages download config <PROJECT_NAME> can materialize a Wrangler file (Pages Wrangler configuration). With a Wrangler file in Pages Functions projects, that file is the source of truth and dashboard fields become read-only (source of truth).

Generated Wrangler configuration at build time

Section titled “Generated Wrangler configuration at build time”

Some tools emit a different Wrangler file for deploy than the one you edit. Wrangler may read .wrangler/deploy/config.json with { "configPath": "../../path/to/wrangler.jsonc" } so wrangler deploy, wrangler dev, and related commands use the build output config (Generated Wrangler configuration). This matters if deploy behavior does not match your root wrangler.jsonc—check whether your bundler or Vite plugin generated a redirect (Bundling).

For pipelines that need machine-readable deploy results, set WRANGLER_OUTPUT_FILE_PATH or WRANGLER_OUTPUT_FILE_DIRECTORY to capture ND-JSON output from wrangler deploy, wrangler versions upload, wrangler versions deploy, and wrangler pages deploy (Capture Wrangler command output).

During wrangler deploy and wrangler versions upload, Wrangler may send npm dependency metadata from package.json unless you disable it:

{
"dependencies_instrumentation": {
"enabled": false
}
}

(Send npm package dependency metadata)

Situation What docs say
Multiple frameworks in one repo (Workers Builds import) Autoconfig fails; set root directory to a single framework (multiple frameworks detected)
Multiple frameworks locally Wrangler prompts you to choose (multiple frameworks detected)
Framework not detected Ensure the framework is a dependency in that directory’s package.json (framework not detected)
Monorepo / workspaces Support is limited; root package.json deps may not be seen (workspaces)
Custom deploy command in Workers Builds Autoconfig runs, but no configuration PR (Automatic pull requests)
SvelteKit first deploy after autoconfig Build may fail until you run wrangler types once (SvelteKit)
Skip autoconfig entirely Add a valid Wrangler file before wrangler deploy (skipping automatic configuration)
  1. Run wrangler --version and confirm 4.68.0 or newer if you rely on default no-config deploy (Deploy an existing project).

  2. In a copy of the project without a Wrangler file, run npx wrangler setup --dry-run and compare the summary to your framework’s guide (e.g. Astro, SvelteKit).

  3. After setup or merge of a Workers Builds config PR, confirm wrangler.jsonc, adapter entries, and deploy / preview scripts exist (what the PR includes).

  4. Deploy once with npx wrangler deploy (or your generated npm run deploy) and open the Workers URL from the CLI output; for CI, optionally enable ND-JSON capture per Capture Wrangler command output.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the official docs or your deploy behavior, email yimasynthetic@gmail.com with the page URL and the exact statement you are questioning so it can be corrected or clarified.