ai-search list
List all AI Search instances
npx wrangler ai-search listyarn wrangler ai-search listpnpm wrangler ai-search list--namespacestringalias: --ndefault: defaultThe namespace to list instances from.
--jsonbooleandefault: falseReturn output as clean JSON
--pagenumberdefault: 1Page number of the results, can configure page size using "per-page"
--per-pagenumberNumber of instances to show per page
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search create
Create a new AI Search instance
npx wrangler ai-search create [NAME]yarn wrangler ai-search create [NAME]pnpm wrangler ai-search create [NAME][NAME]stringrequiredThe name of the AI Search instance to create (must be unique within its namespace).
--namespacestringalias: --nThe namespace to create the instance in.
--sourcestringData source identifier (R2 bucket name or web URL).
--typestringThe source type for the instance.
--source-jurisdictionstringThe R2 jurisdiction of the source bucket (e.g. eu, fedramp). Only valid with --type r2; omit for no specific jurisdiction.
--embedding-modelstringEmbedding model to use.
--generation-modelstringLLM model for chat completions.
--chunk-sizenumberChunk size for document splitting (min: 64).
--chunk-overlapnumberOverlap between document chunks.
--max-num-resultsnumberMaximum search results per query.
--rerankingbooleanEnable reranking of search results.
--reranking-modelstringModel to use for reranking.
--hybrid-searchbooleanEnable hybrid (keyword + vector) search.
--cachebooleanEnable response caching.
--score-thresholdnumberMinimum relevance score threshold (0-1).
--prefixstringR2 key prefix to scope indexing.
--include-itemsarrayGlob patterns for items to include.
--exclude-itemsarrayGlob patterns for items to exclude.
--custom-metadataarrayCustom 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-schemastringPath 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.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search get
Get details of an AI Search instance
npx wrangler ai-search get [NAME]yarn wrangler ai-search get [NAME]pnpm wrangler ai-search get [NAME][NAME]stringrequiredThe name of the AI Search instance.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search update
Update an AI Search instance configuration
npx wrangler ai-search update [NAME]yarn wrangler ai-search update [NAME]pnpm wrangler ai-search update [NAME][NAME]stringrequiredThe name of the AI Search instance to update.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--embedding-modelstringUpdate the embedding model.
--generation-modelstringUpdate the LLM model for chat completions.
--chunk-sizenumberUpdate the chunk size.
--chunk-overlapnumberUpdate the chunk overlap.
--max-num-resultsnumberUpdate max search results per query.
--rerankingbooleanEnable or disable reranking.
--reranking-modelstringUpdate the reranking model.
--hybrid-searchbooleanEnable or disable hybrid search.
--cachebooleanEnable or disable caching.
--score-thresholdnumberUpdate the minimum relevance score threshold (0-1).
--pausedbooleanPause or resume the instance.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search delete
Delete an AI Search instance
npx wrangler ai-search delete [NAME]yarn wrangler ai-search delete [NAME]pnpm wrangler ai-search delete [NAME][NAME]stringrequiredThe name of the AI Search instance to delete.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--forcebooleanalias: --ydefault: falseSkip confirmation
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search stats
Get usage statistics for an AI Search instance
npx wrangler ai-search stats [NAME]yarn wrangler ai-search stats [NAME]pnpm wrangler ai-search stats [NAME][NAME]stringrequiredThe name of the AI Search instance.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search search
Execute a semantic search query against an AI Search instance
npx wrangler ai-search search [NAME]yarn wrangler ai-search search [NAME]pnpm wrangler ai-search search [NAME][NAME]stringrequiredThe name of the AI Search instance.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--querystringrequiredThe search query text.
--max-num-resultsnumberOverride maximum number of results.
--score-thresholdnumberOverride minimum relevance score (0-1).
--rerankingbooleanOverride reranking setting.
--filterarrayMetadata filter as key=value (repeatable, e.g. --filter type=docs --filter lang=en).
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search namespace list
List all AI Search namespaces
npx wrangler ai-search namespace listyarn wrangler ai-search namespace listpnpm wrangler ai-search namespace list--jsonbooleandefault: falseReturn output as clean JSON
--pagenumberdefault: 1Page number of the results, can configure page size using "per-page"
--per-pagenumberNumber of namespaces to show per page
--searchstringFilter namespaces whose name or description contains this string (case-insensitive).
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search namespace create
Create a new AI Search namespace
npx wrangler ai-search namespace create [NAME]yarn wrangler ai-search namespace create [NAME]pnpm wrangler ai-search namespace create [NAME][NAME]stringrequiredThe name of the AI Search namespace to create.
--descriptionstringOptional description for the namespace (max 256 chars).
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search namespace get
Get details of an AI Search namespace
npx wrangler ai-search namespace get [NAME]yarn wrangler ai-search namespace get [NAME]pnpm wrangler ai-search namespace get [NAME][NAME]stringrequiredThe name of the AI Search namespace.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search namespace update
Update an AI Search namespace
npx wrangler ai-search namespace update [NAME]yarn wrangler ai-search namespace update [NAME]pnpm wrangler ai-search namespace update [NAME][NAME]stringrequiredThe name of the AI Search namespace to update.
--descriptionstringUpdated description for the namespace (max 256 chars).
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search namespace delete
Delete an AI Search namespace
npx wrangler ai-search namespace delete [NAME]yarn wrangler ai-search namespace delete [NAME]pnpm wrangler ai-search namespace delete [NAME][NAME]stringrequiredThe name of the AI Search namespace to delete.
--forcebooleanalias: --ydefault: falseSkip confirmation
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search jobs list
List indexing jobs for an AI Search instance
npx wrangler ai-search jobs list [NAME]yarn wrangler ai-search jobs list [NAME]pnpm wrangler ai-search jobs list [NAME][NAME]stringrequiredThe name of the AI Search instance.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--jsonbooleandefault: falseReturn output as clean JSON
--pagenumberdefault: 1Page number of the results, can configure page size using "per-page"
--per-pagenumberNumber of jobs to show per page
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search jobs create
Trigger a new indexing job for an AI Search instance
npx wrangler ai-search jobs create [NAME]yarn wrangler ai-search jobs create [NAME]pnpm wrangler ai-search jobs create [NAME][NAME]stringrequiredThe name of the AI Search instance.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--descriptionstringOptional description for the indexing job.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search jobs get
Get details of an AI Search indexing job
npx wrangler ai-search jobs get [NAME] [JOB-ID]yarn wrangler ai-search jobs get [NAME] [JOB-ID]pnpm wrangler ai-search jobs get [NAME] [JOB-ID][NAME]stringrequiredThe name of the AI Search instance.
[JOB-ID]stringrequiredThe ID of the indexing job.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--jsonbooleandefault: falseReturn output as clean JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search jobs cancel
Cancel an in-progress AI Search indexing job
npx wrangler ai-search jobs cancel [NAME] [JOB-ID]yarn wrangler ai-search jobs cancel [NAME] [JOB-ID]pnpm wrangler ai-search jobs cancel [NAME] [JOB-ID][NAME]stringrequiredThe name of the AI Search instance.
[JOB-ID]stringrequiredThe ID of the indexing job to cancel.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--forcebooleanalias: --ydefault: falseSkip confirmation
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
ai-search jobs logs
List log entries for an AI Search indexing job
npx wrangler ai-search jobs logs [NAME] [JOB-ID]yarn wrangler ai-search jobs logs [NAME] [JOB-ID]pnpm wrangler ai-search jobs logs [NAME] [JOB-ID][NAME]stringrequiredThe name of the AI Search instance.
[JOB-ID]stringrequiredThe ID of the indexing job.
--namespacestringalias: --ndefault: defaultThe namespace the instance belongs to.
--jsonbooleandefault: falseReturn output as clean JSON
--pagenumberdefault: 1Page number of the results, can configure page size using "per-page"
--per-pagenumberNumber of log entries to show per page
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile