From d536ed7fae1f842b49a415ccd0a250fb6f5edba6 Mon Sep 17 00:00:00 2001 From: Ryosei Sato <132046562+sary8@users.noreply.github.com> Date: Mon, 21 Sep 2026 11:46:03 +0900 Subject: [PATCH] [Workers] Fix automatic configuration CLI docs wrangler deploy has no --yes flag, but the deploy options list, the automatic configuration guide and the autoconfig GA changelog all presented it as one. Remove it, and point the guide at wrangler setup --yes followed by the deploy command Wrangler prints when setup finishes. Narrow the guide's "Non-interactive mode" heading to "Skip configuration confirmation", since --yes applies to the confirmation of the detected configuration rather than to every prompt. Retarget the Wrangler command links in the two edited files from /commands/general/ to /commands/workers/, where those commands are documented. --- .../2026-02-25-wrangler-autoconfig-ga.mdx | 4 ++-- .../automatic-configuration.mdx | 18 ++++++++++++------ .../docs/workers/wrangler/commands/workers.mdx | 2 -- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/content/changelog/workers/2026-02-25-wrangler-autoconfig-ga.mdx b/src/content/changelog/workers/2026-02-25-wrangler-autoconfig-ga.mdx index 62fd8ae4361..d1818b46eb6 100644 --- a/src/content/changelog/workers/2026-02-25-wrangler-autoconfig-ga.mdx +++ b/src/content/changelog/workers/2026-02-25-wrangler-autoconfig-ga.mdx @@ -8,7 +8,7 @@ date: 2026-02-25 You can now deploy any existing project to Cloudflare Workers — even without a Wrangler configuration file — and `wrangler deploy` will _just work_. -Starting with Wrangler **4.68.0**, running [`wrangler deploy`](/workers/wrangler/commands/general/#deploy) [automatically configures your project](/workers/framework-guides/automatic-configuration/) by detecting your framework, installing required adapters, and deploying it to Cloudflare Workers. +Starting with Wrangler **4.68.0**, running [`wrangler deploy`](/workers/wrangler/commands/workers/#deploy) [automatically configures your project](/workers/framework-guides/automatic-configuration/) by detecting your framework, installing required adapters, and deploying it to Cloudflare Workers. ### Using Wrangler locally @@ -24,7 +24,7 @@ When you run `wrangler deploy` in a project without a configuration file, Wrangl 4. Generates a `wrangler.jsonc` [configuration file](/workers/wrangler/configuration/) 5. Deploys your project to Cloudflare Workers -You can also use [`wrangler setup`](/workers/wrangler/commands/general/#setup) to configure without deploying, or pass [`--yes`](/workers/wrangler/commands/general/#deploy) to skip prompts. +You can also use [`wrangler setup`](/workers/wrangler/commands/workers/#setup) to configure your project without deploying, and `wrangler setup --yes` to apply the detected configuration without confirmation. ### Using the Cloudflare dashboard diff --git a/src/content/docs/workers/framework-guides/automatic-configuration.mdx b/src/content/docs/workers/framework-guides/automatic-configuration.mdx index d353cb399a9..91ab32a3a0e 100644 --- a/src/content/docs/workers/framework-guides/automatic-configuration.mdx +++ b/src/content/docs/workers/framework-guides/automatic-configuration.mdx @@ -118,7 +118,7 @@ _routes.json ### Deploy with automatic configuration -To deploy an existing project, run [`wrangler deploy`](/workers/wrangler/commands/general/#deploy) in your project directory: +To deploy an existing project, run [`wrangler deploy`](/workers/wrangler/commands/workers/#deploy) in your project directory: @@ -126,7 +126,7 @@ Wrangler will detect your framework, show the configuration it will apply, and p ### Configure without deploying -To configure your project without deploying, use [`wrangler setup`](/workers/wrangler/commands/general/#setup): +To configure your project without deploying, use [`wrangler setup`](/workers/wrangler/commands/workers/#setup): @@ -140,13 +140,19 @@ To see what changes would be made without actually modifying any files: This outputs a summary of the configuration that would be generated. -## Non-interactive mode +## Skip configuration confirmation -To skip the confirmation prompts, use the [`--yes` flag](/workers/wrangler/commands/general/#deploy): +To apply the detected configuration without confirming it, pass `--yes` to [`wrangler setup`](/workers/wrangler/commands/workers/#setup): - + -This applies the configuration automatically using sensible defaults. This is useful in CI/CD environments or when you want to accept the detected settings without reviewing them. +This is useful in CI/CD environments, or when you want to accept the detected settings without reviewing them. + +When setup finishes, Wrangler prints the command to deploy with. In a project with a `package.json`, use the generated `deploy` script: + + + +If Wrangler detected a build command, the generated script runs it before deploying. In a project without a `package.json`, run `wrangler deploy`. ## Importing a repository from the dashboard diff --git a/src/content/docs/workers/wrangler/commands/workers.mdx b/src/content/docs/workers/wrangler/commands/workers.mdx index ce5a4f8a03d..9a55357b4ae 100644 --- a/src/content/docs/workers/wrangler/commands/workers.mdx +++ b/src/content/docs/workers/wrangler/commands/workers.mdx @@ -249,8 +249,6 @@ None of the options for this command are required. Also, many can be set in your - A tag for this Worker version. Matches the behavior of `wrangler versions upload --tag`. - `--message` - A descriptive message for this Worker version and deployment. Matches the behavior of `wrangler versions upload --message`. The message is also applied to the deployment. -- `--yes` - - Skip confirmation prompts and run [automatic project configuration](/workers/framework-guides/automatic-configuration/) non-interactively using detected settings. Only applicable when no Wrangler configuration file exists in your project. - `--temporary` - Deploy with a temporary preview account when no Cloudflare credentials are available. Requires Wrangler 4.102.0 or later. Wrangler prints a claim URL that lets you claim the deployment within 60 minutes. This is intended for AI agents and other first-time deployment flows. If Wrangler can already use OAuth, `CLOUDFLARE_API_TOKEN`, or a global API key, this flag returns an error. For more information, refer to [Claim deployments](/workers/platform/claim-deployments/).