Wrangler commands
Vectorize uses the following Wrangler Commands.
Create a Vectorize index
npx wrangler vectorize create [NAME]pnpm wrangler vectorize create [NAME]yarn wrangler vectorize create [NAME]-
--namestring requiredThe name of the Vectorize index to create (must be unique).
-
--dimensionsnumberThe dimension size to configure this index for, based on the output dimensions of your ML model.
-
--metricstringThe distance metric to use for searching within the index.
-
--presetstringThe name of an preset representing an embeddings model: Vectorize will configure the dimensions and distance metric for you when provided.
-
--descriptionstringAn optional description for this index.
-
--jsonboolean default: falseReturn output as clean JSON
-
--deprecated-v1boolean default: falseCreate a deprecated Vectorize V1 index. This is not recommended and indexes created with this option need all other Vectorize operations to have this option enabled.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Delete a Vectorize index
npx wrangler vectorize delete [NAME]pnpm wrangler vectorize delete [NAME]yarn wrangler vectorize delete [NAME]-
--namestring requiredThe name of the Vectorize index
-
--forceboolean alias: --y default: falseSkip confirmation
-
--deprecated-v1boolean default: falseDelete a deprecated Vectorize V1 index.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Get a Vectorize index by name
npx wrangler vectorize get [NAME]pnpm wrangler vectorize get [NAME]yarn wrangler vectorize get [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--jsonboolean default: falseReturn output as clean JSON
-
--deprecated-v1boolean default: falseFetch a deprecated V1 Vectorize index. This must be enabled if the index was created with V1 option.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
List your Vectorize indexes
npx wrangler vectorize listpnpm wrangler vectorize listyarn wrangler vectorize list-
--jsonboolean default: falseReturn output as clean JSON
-
--deprecated-v1boolean default: falseList deprecated Vectorize V1 indexes for your account.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
List vector identifiers in a Vectorize index
npx wrangler vectorize list-vectors [NAME]pnpm wrangler vectorize list-vectors [NAME]yarn wrangler vectorize list-vectors [NAME]-
--namestring requiredThe name of the Vectorize index
-
--countnumberMaximum number of vectors to return (1-1000)
-
--cursorstringCursor for pagination to get the next page of results
-
--jsonboolean default: falseReturn output as clean JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Query a Vectorize index
npx wrangler vectorize query [NAME]pnpm wrangler vectorize query [NAME]yarn wrangler vectorize query [NAME]-
--namestring requiredThe name of the Vectorize index
-
--vectornumberVector to query the Vectorize Index
-
--vector-idstringIdentifier for a vector in the index against which the index should be queried
-
--top-knumber default: 5The number of results (nearest neighbors) to return
-
--return-valuesboolean default: falseSpecify if the vector values should be included in the results
-
--return-metadatastring default: noneSpecify if the vector metadata should be included in the results
-
--namespacestringFilter the query results based on this namespace
-
--filterstringFilter the query results based on this metadata filter.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Insert vectors into a Vectorize index
npx wrangler vectorize insert [NAME]pnpm wrangler vectorize insert [NAME]yarn wrangler vectorize insert [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--filestring requiredA file containing line separated json (ndjson) vector objects.
-
--batch-sizenumber default: 1000Number of vector records to include when sending to the Cloudflare API.
-
--jsonboolean default: falsereturn output as clean JSON
-
--deprecated-v1boolean default: falseInsert into a deprecated V1 Vectorize index. This must be enabled if the index was created with the V1 option.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Upsert vectors into a Vectorize index
npx wrangler vectorize upsert [NAME]pnpm wrangler vectorize upsert [NAME]yarn wrangler vectorize upsert [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--filestring requiredA file containing line separated json (ndjson) vector objects.
-
--batch-sizenumber default: 5000Number of vector records to include in a single upsert batch when sending to the Cloudflare API.
-
--jsonboolean default: falsereturn output as clean JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Get vectors from a Vectorize index
npx wrangler vectorize get-vectors [NAME]pnpm wrangler vectorize get-vectors [NAME]yarn wrangler vectorize get-vectors [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--idsstring requiredVector identifiers to be fetched from the Vectorize Index. Example:
--ids a 'b' 1 '2'
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Delete vectors in a Vectorize index
npx wrangler vectorize delete-vectors [NAME]pnpm wrangler vectorize delete-vectors [NAME]yarn wrangler vectorize delete-vectors [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--idsstring requiredVector identifiers to be deleted from the Vectorize Index. Example:
--ids a 'b' 1 '2'
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Get additional details about the index
npx wrangler vectorize info [NAME]pnpm wrangler vectorize info [NAME]yarn wrangler vectorize info [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--jsonboolean default: falsereturn output as clean JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Enable metadata filtering on the specified property
npx wrangler vectorize create-metadata-index [NAME]pnpm wrangler vectorize create-metadata-index [NAME]yarn wrangler vectorize create-metadata-index [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--propertyNamestring requiredThe name of the metadata property to index.
-
--typestring requiredThe type of metadata property to index. Valid types are 'string', 'number' and 'boolean'.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
List metadata properties on which metadata filtering is enabled
npx wrangler vectorize list-metadata-index [NAME]pnpm wrangler vectorize list-metadata-index [NAME]yarn wrangler vectorize list-metadata-index [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--jsonboolean default: falsereturn output as clean JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Delete metadata indexes
npx wrangler vectorize delete-metadata-index [NAME]pnpm wrangler vectorize delete-metadata-index [NAME]yarn wrangler vectorize delete-metadata-index [NAME]-
--namestring requiredThe name of the Vectorize index.
-
--propertyNamestring requiredThe name of the metadata property to index.
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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-remote-bindingsboolean aliases: --x-remote-bindings default: trueExperimental: Enable Remote Bindings
-
--experimental-provisionboolean aliases: --x-provisionExperimental: Enable automatic resource provisioning
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark