Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Shell tab completions for Wrangler CLI
description: Wrangler now supports shell tab completions for Bash, Zsh, Fish, and PowerShell, making it faster to navigate commands and flags.
products:
- workers
date: 2026-01-09
---

Wrangler now includes built-in shell tab completion support, making it faster and easier to navigate commands without memorizing every option. Press Tab as you type to autocomplete commands, subcommands, flags, and even option values like log levels.

Tab completions are supported for Bash, Zsh, Fish, and PowerShell.

### Setup

Generate the completion script for your shell and add it to your configuration file:

```sh
# Bash
wrangler complete bash >> ~/.bashrc

# Zsh
wrangler complete zsh >> ~/.zshrc

# Fish
wrangler complete fish >> ~/.config/fish/config.fish

# PowerShell
wrangler complete powershell >> $PROFILE
```

After adding the script, restart your terminal or source your configuration file for the changes to take effect. Then you can simply press Tab to see available completions:

```sh
wrangler d<TAB> # completes to 'deploy', 'dev', 'd1', etc.
wrangler kv <TAB> # shows subcommands: namespace, key, bulk
```

Tab completions are dynamically generated from Wrangler's command registry, so they stay up-to-date as new commands and options are added. This feature is powered by [`@bomb.sh/tab`](https://github.com/bombshell-dev/tab/).

See the [`wrangler complete` documentation](/workers/wrangler/commands/#complete) for more details.
64 changes: 64 additions & 0 deletions src/content/docs/workers/wrangler/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

- [`docs`](#docs) - Open this page in your default browser.
- [`init`](#init) - Create a new project from a variety of web frameworks and templates.
- [`complete`](#complete) - Generate shell completion scripts for Wrangler commands.
- [`containers`](#containers) - Interact with Containers.
- [`d1`](#d1) - Interact with D1.
- [`vectorize`](#vectorize) - Interact with Vectorize indexes.
Expand Down Expand Up @@ -496,7 +497,7 @@
✓ Select an account: › My account
| Name | ID | StoreID | Comment | Scopes | Status | Created | Modified |
|-----------------------------|-------------------------------------|-------------------------------------|---------|---------|---------|------------------------|------------------------|
| ServiceA_key-1 | 13bc7498c6374a4e9d13be091c3c65f1 | 8f7a1cdced6342c18d223ece462fd88d | | workers | active | 4/9/2025, 10:06:01 PM | 4/15/2025, 09:13:05 AM |

Check warning on line 500 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Check warning on line 500 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

<WranglerCommand command="secrets-store secret delete" headingLevel={3} />
Expand Down Expand Up @@ -550,7 +551,7 @@
┌─────────┬──────────────────────────────────┬──────────────────────────────────┬──────────────────────┬──────────────────────┐
│ Name │ ID │ AccountID │ Created │ Modified │
├─────────┼──────────────────────────────────┼──────────────────────────────────┼──────────────────────┼──────────────────────┤
│ default │ 8876bad33f164462bf0743fe8adf98f4 │ REDACTED │ 4/9/2025, 1:11:48 PM │ 4/9/2025, 1:11:48 PM │

Check warning on line 554 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Check warning on line 554 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
└─────────┴──────────────────────────────────┴──────────────────────────────────┴──────────────────────┴──────────────────────┘
```

Expand Down Expand Up @@ -818,7 +819,7 @@
Success! Uploaded mTLS Certificate my-origin-cert
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Expires: 1/01/2025

Check warning on line 822 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

You can then add this certificate as a [binding](/workers/runtime-apis/bindings/) in your [Wrangler configuration file](/workers/wrangler/configuration/):
Expand Down Expand Up @@ -847,13 +848,13 @@
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Name: my-origin-cert
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Created on: 1/01/2023

Check warning on line 851 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
Expires: 1/01/2025

Check warning on line 852 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

ID: c5d004d1-8312-402c-b8ed-6194328d5cbe
Issuer: CN=another-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Created on: 1/01/2023

Check warning on line 856 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
Expires: 1/01/2025

Check warning on line 857 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

<WranglerCommand command="mtls-certificate delete" headingLevel={3} />
Expand Down Expand Up @@ -892,7 +893,7 @@
Success! Uploaded mTLS Certificate my-origin-cert
ID: 99f5fef1-6cc1-46b8-bd79-44a0d5082b8d
Issuer: CN=my-secured-origin.com,OU=my-team,O=my-org,L=San Francisco,ST=California,C=US
Expires: 1/01/2025

Check warning on line 896 in src/content/docs/workers/wrangler/commands.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
```

Note that the certificate and private keys must be in separate (typically `.pem`) files when uploading.
Expand Down Expand Up @@ -1054,3 +1055,66 @@
- If you don't use a Wrangler config file with your Pages project (i.e. a Wrangler config file containing `pages_build_output_dir`), use this flag to force `wrangler check startup` to treat your project as a Pages project.

<Render file="wrangler-commands/global-flags" product="workers" />

---

## `complete`

Generate shell completion scripts for Wrangler commands. Shell completions allow you to autocomplete commands, subcommands, and flags by pressing Tab as you type.

```txt
wrangler complete <SHELL>
```

- `SHELL` <Type text="string" /> <MetaInfo text="required" />
- The shell to generate completions for. Supported values: `bash`, `zsh`, `fish`, `powershell`.

### Setup

Generate and add the completion script to your shell configuration file:

<Tabs>
<TabItem label="Bash">
```sh
wrangler complete bash >> ~/.bashrc
```

Then restart your terminal or run `source ~/.bashrc`.

</TabItem>
<TabItem label="Zsh">
```sh
wrangler complete zsh >> ~/.zshrc
```

Then restart your terminal or run `source ~/.zshrc`.

</TabItem>
<TabItem label="Fish">
```sh
wrangler complete fish >> ~/.config/fish/config.fish
```

Then restart your terminal or run `source ~/.config/fish/config.fish`.

</TabItem>
<TabItem label="PowerShell">
```powershell
wrangler complete powershell >> $PROFILE
```

Then restart PowerShell or run `. $PROFILE`.

</TabItem>
</Tabs>

### Usage

After setup, press Tab to autocomplete commands, subcommands, and flags:

```sh
wrangler d<TAB> # completes to 'deploy', 'dev', 'd1', etc.
wrangler kv <TAB> # shows subcommands: namespace, key, bulk
```

<Render file="wrangler-commands/global-flags" product="workers" />
Loading