Wrangler CLI

Last updated Jul 8, 2026

ai-search list

List all AI Search instances

npmyarnpnpm

npx wrangler ai-search list
yarn wrangler ai-search list
pnpm wrangler ai-search list
  • --namespace string alias: --ndefault: default

The namespace to list instances from. - --json boolean default: false

Return output as clean JSON - --page number default: 1

Page number of the results, can configure page size using "per-page" - --per-page number Number of instances to show per page

<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>

ai-search create

Create a new AI Search instance

npmyarnpnpm

npx wrangler ai-search create <NAME>
yarn wrangler ai-search create <NAME>
pnpm wrangler ai-search create <NAME>
  • <NAME> string required

The name of the AI Search instance to create (must be unique within its namespace). - --namespace string alias: --n

The namespace to create the instance in. - --source string Data source identifier (R2 bucket name or web URL). - --type string The source type for the instance. - --parse-type string How website URLs are discovered (--type web-crawler only). 'sitemap' reads XML sitemaps; 'discover' follows links recursively. Defaults to 'sitemap'. - --source-jurisdiction string The R2 jurisdiction of the source bucket (e.g. eu, fedramp). Only valid with --type r2; omit for no specific jurisdiction. - --embedding-model string Embedding model to use. - --generation-model string LLM model for chat completions. - --chunk-size number Chunk size for document splitting (min: 64). - --chunk-overlap number Overlap between document chunks. - --max-num-results number Maximum search results per query. - --reranking boolean Enable reranking of search results. - --reranking-model string Model to use for reranking. - --hybrid-search boolean Enable hybrid (keyword + vector) search. - --cache boolean Enable response caching. - --score-threshold number Minimum relevance score threshold (0-1). - --prefix string R2 key prefix to scope indexing. - --include-items array Glob patterns for items to include. - --exclude-items array Glob patterns for items to exclude. - --custom-metadata array Custom metadata fields, formatted as 'field_name:data_type'. data_type must be one of: text, number, boolean, datetime. Repeat the flag for multiple fields (e.g. --custom-metadata title:text --custom-metadata views:number). - --custom-metadata-schema string Path to a JSON file describing custom metadata fields. The file must contain an array of { "field_name", "data_type" } objects. Mutually exclusive with --custom-metadata. - --json boolean default: false

Return output as clean JSON

<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>

ai-search get

Get details of an AI Search instance

npmyarnpnpm

npx wrangler ai-search get <NAME>
yarn wrangler ai-search get <NAME>
pnpm wrangler ai-search get <NAME>
  • <NAME> string required

The name of the AI Search instance. - --namespace string alias: --ndefault: default

The namespace the instance belongs to. - --json boolean default: false

Return output as clean JSON

<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>

ai-search update

Update an AI Search instance configuration

npmyarnpnpm

npx wrangler ai-search update <NAME>
yarn wrangler ai-search update <NAME>
pnpm wrangler ai-search update <NAME>
  • <NAME> string required

The name of the AI Search instance to update. - --namespace string alias: --ndefault: default

The namespace the instance belongs to. - --embedding-model string Update the embedding model. - --generation-model string Update the LLM model for chat completions. - --chunk-size number Update the chunk size. - --chunk-overlap number Update the chunk overlap. - --max-num-results number Update max search results per query. - --reranking boolean Enable or disable reranking. - --reranking-model string Update the reranking model. - --hybrid-search boolean Enable or disable hybrid search. - --cache boolean Enable or disable caching. - --score-threshold number Update the minimum relevance score threshold (0-1). - --paused boolean Pause or resume the instance. - --json boolean default: false

Return output as clean JSON

<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>

ai-search delete

Delete an AI Search instance

npmyarnpnpm

npx wrangler ai-search delete <NAME>
yarn wrangler ai-search delete <NAME>
pnpm wrangler ai-search delete <NAME>
  • <NAME> string required

The name of the AI Search instance to delete. - --namespace string alias: --ndefault: default

The namespace the instance belongs to. - --force boolean alias: --ydefault: false

Skip confirmation

<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>

ai-search stats

Get usage statistics for an AI Search instance

npmyarnpnpm

npx wrangler ai-search stats <NAME>
yarn wrangler ai-search stats <NAME>
pnpm wrangler ai-search stats <NAME>
  • <NAME> string required

The name of the AI Search instance. - --namespace string alias: --ndefault: default

The namespace the instance belongs to. - --json boolean default: false

Return output as clean JSON

<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>

Execute a semantic search query against an AI Search instance

npmyarnpnpm

npx wrangler ai-search search <NAME>
yarn wrangler ai-search search <NAME>
pnpm wrangler ai-search search <NAME>
  • <NAME> string required

The name of the AI Search instance. - --namespace string alias: --ndefault: default

The namespace the instance belongs to. - --query string required

The search query text. - --max-num-results number Override maximum number of results. - --score-threshold number Override minimum relevance score (0-1). - --reranking boolean Override reranking setting. - --filter array Metadata filter as key=value (repeatable, e.g. --filter type=docs --filter lang=en). - --json boolean default: false

Return output as clean JSON

<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>

ai-search namespace list

List all AI Search namespaces

npmyarnpnpm

npx wrangler ai-search namespace list
yarn wrangler ai-search namespace list
pnpm wrangler ai-search namespace list
  • --json boolean default: false

Return output as clean JSON - --page number default: 1

Page number of the results, can configure page size using "per-page" - --per-page number Number of namespaces to show per page - --search string Filter namespaces whose name or description contains this string (case-insensitive).

<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>

ai-search namespace create

Create a new AI Search namespace

npmyarnpnpm

npx wrangler ai-search namespace create <NAME>
yarn wrangler ai-search namespace create <NAME>
pnpm wrangler ai-search namespace create <NAME>
  • <NAME> string required

The name of the AI Search namespace to create. - --description string Optional description for the namespace (max 256 chars). - --json boolean default: false

Return output as clean JSON

<details>

<summary>

Global flags

</summary>

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