General commands·续

The command returns whichever authentication method is currently configured, in the following order of precedence:

  • API token from CLOUDFLARE_API_TOKEN environment variable
  • API key/email from CLOUDFLARE_API_KEY and CLOUDFLARE_EMAIL environment variables (requires --json flag, since this method uses two values instead of a single token)
  • OAuth token from wrangler login (automatically refreshed if expired)

When using --json, the output includes the token type:

// API token
{ "type": "api_token", "token": "..." }

// OAuth token
{ "type": "oauth", "token": "..." }

// API key/email (only available with --json)
{ "type": "api_key", "key": "...", "email": "..." }

An error is returned if no authentication method is available, or if API key/email is configured without --json.

The following global flags work on every command:

  • --help boolean
  • Show help.
  • --config string (not supported by Pages)
  • Path to your Wrangler configuration file.
  • --cwd string
  • Run as if Wrangler was started in the specified directory instead of the current working directory.

auth create

Experimental

Create or re-authenticate a named auth profile

npmyarnpnpm

npx wrangler auth create <NAME>
yarn wrangler auth create <NAME>
pnpm wrangler auth create <NAME>
  • <NAME> string required

Name for the auth profile - --browser boolean default: true

Automatically open the OAuth link in a browser - --scopes string Pick the set of applicable OAuth scopes when logging in - --callback-host string default: localhost

Use the ip or host address for the temporary login callback server. - --callback-port number default: 8976

Use the port for the temporary login callback server.

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

auth activate

Experimental

Bind a named auth profile to a directory

npmyarnpnpm

npx wrangler auth activate <NAME> [DIR]
yarn wrangler auth activate <NAME> [DIR]
pnpm wrangler auth activate <NAME> [DIR]
  • <NAME> string required

Name of the auth profile to activate - [DIR] string Directory to bind the profile to (defaults to current directory)

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

auth deactivate

Experimental

Remove the auth profile binding from a directory

npmyarnpnpm

npx wrangler auth deactivate [DIR]
yarn wrangler auth deactivate [DIR]
pnpm wrangler auth deactivate [DIR]
  • [DIR] string Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

auth list

Experimental

List all auth profiles

npmyarnpnpm

npx wrangler auth list
yarn wrangler auth list
pnpm wrangler auth list

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

auth delete

Experimental

Delete a named auth profile

npmyarnpnpm

npx wrangler auth delete <NAME>
yarn wrangler auth delete <NAME>
pnpm wrangler auth delete <NAME>
  • <NAME> string required

Name of the auth profile to delete

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>


whoami

🕵️ Retrieve your user information

npmyarnpnpm

npx wrangler whoami
yarn wrangler whoami
pnpm wrangler whoami
  • --account string Show membership information for the given account (id or name).
  • --json boolean default: false

Return user information as JSON. Exits with a non-zero status if not authenticated.

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>


telemetry

Cloudflare collects anonymous usage data to improve Wrangler. You can learn more about this in our data policy ↗︎.

You can manage sharing of usage data at any time using these commands.

disable

Disable telemetry collection for Wrangler.

wrangler telemetry disable

enable

Enable telemetry collection for Wrangler.

wrangler telemetry enable

status

Check whether telemetry collection is currently enabled. The return result is specific to the directory where you have run the command.

This will resolve the global status set by wrangler telemetry disable / enable, the environment variable WRANGLER_SEND_METRICS, and the send_metrics key in the Wrangler configuration file.

wrangler telemetry status

The following global flags work on every command:

  • --help boolean
  • Show help.
  • --config string (not supported by Pages)
  • Path to your Wrangler configuration file.
  • --cwd string
  • Run as if Wrangler was started in the specified directory instead of the current working directory.

complete

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

wrangler complete <SHELL>
  • SHELL string 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:

wrangler complete bash >> ~/.bashrc

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

wrangler complete zsh >> ~/.zshrc

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

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

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

wrangler complete powershell >> $PROFILE

Then restart PowerShell or run . $PROFILE.

Usage

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

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

The following global flags work on every command:

  • --help boolean
  • Show help.
  • --config string (not supported by Pages)
  • Path to your Wrangler configuration file.
  • --cwd string
  • Run as if Wrangler was started in the specified directory instead of the current working directory.

Was this helpful?

YesNo

On this page

General commands·续 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/wrangler/commands/general/#page","headline":"General commands","description":"General Wrangler commands for authentication, telemetry, and shell completions.","url":"https://developers.cloudflare.com/workers/wrangler/commands/general/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/wrangler/commands/general/og.png?v=54c307af06ce2142","dateModified":"2026-09-02","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Wrangler commands for managing Hyperdrive database configurations. title: Hyperdrive image: https://developers.cloudflare.com/workers/wrangler/commands/hyperdrive/og.png?v=079b4128de1dd679


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.