Skip to content

Wrangler commands

Last updated View as MarkdownAgent setup

Vectorize uses the following Wrangler Commands.

vectorize create

Create a Vectorize index

npx wrangler vectorize create [NAME]
  • [NAME]string required

    The name of the Vectorize index to create (must be unique).

  • --dimensionsnumber

    The dimension size to configure this index for, based on the output dimensions of your ML model.

  • --metricstring

    The distance metric to use for searching within the index.

  • --presetstring

    The name of an preset representing an embeddings model: Vectorize will configure the dimensions and distance metric for you when provided.

  • --descriptionstring

    An optional description for this index.

  • --jsonboolean default: false

    Return output as JSON

  • --deprecated-v1boolean default: false

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

  • --use-remoteboolean

    Use a remote binding when adding the newly created resource to your config

  • --update-configboolean

    Automatically update your config file with the newly added resource

  • --bindingstring

    The binding name of this resource in your Worker

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize delete

Delete a Vectorize index

npx wrangler vectorize delete [NAME]
  • [NAME]string required

    The name of the Vectorize index

  • --forceboolean alias: --ydefault: false

    Skip confirmation

  • --deprecated-v1boolean default: false

    Delete a deprecated Vectorize V1 index.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize get

Get a Vectorize index by name

npx wrangler vectorize get [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --jsonboolean default: false

    Return output as JSON

  • --deprecated-v1boolean default: false

    Fetch a deprecated V1 Vectorize index. This must be enabled if the index was created with V1 option.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize list

List your Vectorize indexes

npx wrangler vectorize list
  • --jsonboolean default: false

    Return output as JSON

  • --deprecated-v1boolean default: false

    List deprecated Vectorize V1 indexes for your account.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize list-vectors

List vector identifiers in a Vectorize index

npx wrangler vectorize list-vectors [NAME]
  • [NAME]string required

    The name of the Vectorize index

  • --countnumber

    Maximum number of vectors to return (1-1000)

  • --cursorstring

    Cursor for pagination to get the next page of results

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize query

Query a Vectorize index

npx wrangler vectorize query [NAME]
  • [NAME]string required

    The name of the Vectorize index

  • --vectornumber

    Vector to query the Vectorize Index

  • --vector-idstring

    Identifier for a vector in the index against which the index should be queried

  • --top-knumber default: 5

    The number of results (nearest neighbors) to return

  • --return-valuesboolean default: false

    Specify if the vector values should be included in the results

  • --return-metadatastring default: none

    Specify if the vector metadata should be included in the results

  • --namespacestring

    Filter the query results based on this namespace

  • --filterstring

    Filter the query results based on this metadata filter.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize insert

Insert vectors into a Vectorize index

npx wrangler vectorize insert [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --filestring required

    A file containing line separated json (ndjson) vector objects.

  • --batch-sizenumber default: 1000

    Number of vector records to include when sending to the Cloudflare API.

  • --jsonboolean default: false

    return output as JSON

  • --deprecated-v1boolean default: false

    Insert into a deprecated V1 Vectorize index. This must be enabled if the index was created with the V1 option.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize upsert

Upsert vectors into a Vectorize index

npx wrangler vectorize upsert [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --filestring required

    A file containing line separated json (ndjson) vector objects.

  • --batch-sizenumber default: 5000

    Number of vector records to include in a single upsert batch when sending to the Cloudflare API.

  • --jsonboolean default: false

    return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize get-vectors

Get vectors from a Vectorize index

npx wrangler vectorize get-vectors [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --idsstring required

    Vector identifiers to be fetched from the Vectorize Index. Example: --ids a 'b' 1 '2'

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize delete-vectors

Delete vectors in a Vectorize index

npx wrangler vectorize delete-vectors [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --idsstring required

    Vector identifiers to be deleted from the Vectorize Index. Example: --ids a 'b' 1 '2'

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize info

Get additional details about the index

npx wrangler vectorize info [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --jsonboolean default: false

    return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize create-metadata-index

Enable metadata filtering on the specified property

npx wrangler vectorize create-metadata-index [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --propertyNamestring required

    The name of the metadata property to index.

  • --typestring required

    The type of metadata property to index. Valid types are 'string', 'number' and 'boolean'.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize list-metadata-index

List metadata properties on which metadata filtering is enabled

npx wrangler vectorize list-metadata-index [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --jsonboolean default: false

    return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

vectorize delete-metadata-index

Delete metadata indexes

npx wrangler vectorize delete-metadata-index [NAME]
  • [NAME]string required

    The name of the Vectorize index.

  • --propertyNamestring required

    The name of the metadata property to index.

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

Was this helpful?