Skip to content

Conversation

@AmirSa12
Copy link

This PR introduces tab completion functionality for the wrangler cli, improving developer experience by allowing shell(zsh, powershell, fish, bash) autocompletion for commands, options, values, and flags. This also comes with npm, pnpm, yarn and bun copmpletions! ( npm exec ... , pnpm ... ) With this PR, users can navigate available commands, options and values more efficiently and faster with speeding up workflow.

A small video of how this looks:

wrangler.mp4

  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because:
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because:

@AmirSa12 AmirSa12 requested a review from a team as a code owner October 28, 2025 08:33
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: e9c0d42

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@AmirSa12 AmirSa12 force-pushed the feat/tab-completions branch from 45886d3 to e9c0d42 Compare October 30, 2025 12:01
Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Awesome stuff, thanks so much @AmirSa12 🙏

I've left a comment regarding the completions setup, could you take a look? 😄

Also could you advise on how I can manually test this feature? 🙂
(is there a setup required, etc...)

@@ -0,0 +1,304 @@
// NOTE: The provided option-value completions can be customized or removed as needed.
// NOTE: Descriptions and flags based on https://developers.cloudflare.com/workers/wrangler/commands/
Copy link
Member

Choose a reason for hiding this comment

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

I think that taking the values from the docs and using them here is a bit problematic (as we'd also need to keep them in sync, etc...)

Could you try to instead use the experimental_getWranglerCommands function to dynamically get the information you need and setup the completions from that? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants