Skip to content

Suggest similar commands when a typo is detected#14569

Open
dario-piotrowicz wants to merge 2 commits into
mainfrom
dario/wrangler-command-typo
Open

Suggest similar commands when a typo is detected#14569
dario-piotrowicz wants to merge 2 commits into
mainfrom
dario/wrangler-command-typo

Conversation

@dario-piotrowicz

Copy link
Copy Markdown
Member

This PR updates Wrangler to suggest the likely correct command when a user mistypes a command.

I'm not sure how valuable this is (I do think this improves UX somewhat) it was just a quick idea I had 🙂


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: improved UX

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6b9c442

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14569

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14569

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14569

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14569

miniflare

npm i https://pkg.pr.new/miniflare@14569

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14569

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14569

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14569

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14569

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14569

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14569

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14569

wrangler

npm i https://pkg.pr.new/wrangler@14569

commit: 6b9c442

@dario-piotrowicz dario-piotrowicz force-pushed the dario/wrangler-command-typo branch from 926c16b to 0bfd645 Compare July 6, 2026 10:52
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@dario-piotrowicz dario-piotrowicz force-pushed the dario/wrangler-command-typo branch from 0bfd645 to 3a4b143 Compare July 6, 2026 10:54
@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review July 6, 2026 13:36
@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team July 6, 2026 13:36
@workers-devprod

workers-devprod commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Comment thread packages/wrangler/src/utils/levenshtein.ts Outdated
expect(std.info).toContain('Did you mean "wrangler whoami"?');
});

it("should suggest 'deploy' when user types 'delpoy'", async ({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it overkill to have similar tests here and in did-you-mean.test.ts?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mh.... I don't think it causes much harm 🤔 would you prefer that we'd remove some?

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants