diff --git a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx index 6a5472200ff9670..5d8f1790ad6a538 100644 --- a/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx +++ b/src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx @@ -29,7 +29,7 @@ You will use C3 for new project creation. [Wrangler](/workers/wrangler/) is a command-line tool for building with Cloudflare developer products. -With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-1) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands. +With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands. When you run C3 to create your project, C3 will install the latest version of Wrangler and you do not need to install Wrangler again. You can [update Wrangler](/workers/wrangler/install-and-update/#update-wrangler) to a newer version in your project to access new Wrangler capabilities and features. diff --git a/src/content/docs/workers/configuration/secrets.mdx b/src/content/docs/workers/configuration/secrets.mdx index e5349fce3e78a56..b217268956ad9af 100644 --- a/src/content/docs/workers/configuration/secrets.mdx +++ b/src/content/docs/workers/configuration/secrets.mdx @@ -59,7 +59,7 @@ To add a secret via the dashboard: #### Via Wrangler -Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-2) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands. +Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-1) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands. `wrangler secret delete` creates a new version of the Worker and deploys it immediately. diff --git a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx index 9d5dc92e8876600..82f78c7bb6016f5 100644 --- a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx +++ b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx @@ -157,7 +157,7 @@ curl -s https://example.com -H 'Cloudflare-Workers-Version-Overrides: my-worker- The dictionary can contain multiple key-value pairs. Each key indicates the name of the Worker the override should be applied to. The value indicates the version ID that should be used and must be a [String](https://www.rfc-editor.org/rfc/rfc8941#name-strings). -A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-5) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. +A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-6) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. :::note[Verifying that the version override was applied] diff --git a/src/content/docs/workers/configuration/versions-and-deployments/index.mdx b/src/content/docs/workers/configuration/versions-and-deployments/index.mdx index 686d29ad56a3cf3..b2c8f3085132611 100644 --- a/src/content/docs/workers/configuration/versions-and-deployments/index.mdx +++ b/src/content/docs/workers/configuration/versions-and-deployments/index.mdx @@ -73,7 +73,7 @@ New versions are not created when you make changes to [resources connected to yo #### Via Wrangler -Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-4) and [`deployments`](/workers/wrangler/commands/#list-5) documentation to view the commands. +Wrangler allows you to view the 10 most recent versions and deployments. Refer to the [`versions list`](/workers/wrangler/commands/#list-5) and [`deployments`](/workers/wrangler/commands/#list-6) documentation to view the commands. #### Via the Cloudflare dashboard diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 016d8573f6edab9..9e01d54c1dafcb2 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -181,222 +181,7 @@ Manage [Hyperdrive](/hyperdrive/) database configurations. Interact with a [Vectorize](/vectorize/) vector database. -### `create` - -Creates a new vector index, and provides the binding and name that you will put in your Wrangler file. - -```sh -npx wrangler vectorize create [--dimensions=] [--metric=] [--description=] -``` - -- `INDEX_NAME` - - The name of the new index to create. Must be unique for an account and cannot be changed after creation. -- `--dimensions` - - The vector dimension width to configure the index for. Cannot be changed after creation. -- `--metric` - - The distance metric to use for calculating vector distance. Must be one of `cosine`, `euclidean`, or `dot-product`. -- `--description` - - A description for your index. -- `--deprecated-v1` - - Create a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). - - - -### `list` - -List all Vectorize indexes in your account, including the configured dimensions and distance metric. - -```sh -npx wrangler vectorize list -``` - -- `--deprecated-v1` - - List legacy Vectorize indexes. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). - - - -### `get` - -Get details about an individual index, including its configuration. - -```sh -npx wrangler vectorize get -``` - -- `INDEX_NAME` - - The name of the index to fetch details for. -- `--deprecated-v1` - - Get a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). - - - -### `info` - -Get some additional information about an individual index, including the vector count and details about the last processed mutation. - -```sh -npx wrangler vectorize info -``` - -- `INDEX_NAME` - - The name of the index to fetch details for. - - - -### `delete` - -Delete a Vectorize index. - -```sh -npx wrangler vectorize delete [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index to delete. -- `--force` - - Skip confirmation when deleting the index (Note: This is not a recoverable operation). -- `--deprecated-v1` - - Delete a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). - - - -### `insert` - -Insert vectors into an index. - -```sh -npx wrangler vectorize insert [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index to upsert vectors in. -- `--file` - - A file containing the vectors to insert in newline-delimited JSON (JSON) format. -- `--batch-size` - - The number of vectors to insert at a time (default: `1000`). -- `--deprecated-v1` - - Insert into a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). - - - -### `upsert` - -Upsert vectors into an index. Existing vectors in the index would be overwritten. - -```sh -npx wrangler vectorize upsert [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index to upsert vectors in. -- `--file` - - A file containing the vectors to insert in newline-delimited JSON (JSON) format. -- `--batch-size` - - The number of vectors to insert at a time (default: `5000`). - - - -### `query` - -Query a Vectorize index for similar vectors. - -```sh -npx wrangler vectorize query [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index to query. -- `--vector` - - Vector against which the Vectorize index is queried. Either this or the `vector-id` param must be provided. -- `--vector-id` - - Identifier for a vector that is already present in the index against which the index is queried. Either this or the `vector` param must be provided. -- `--top-k` - - The number of vectors to query (default: `5`). -- `--return-values` - - Enable to return vector values in the response (default: `false`). -- `--return-metadata` - - Enable to return vector metadata in the response. Must be one of `none`, `indexed`, or `all` (default: `none`). -- `--namespace` - - Query response to only include vectors from this namespace. -- `--filter` - - Filter vectors based on this metadata filter. Example: `'{ 'p1': 'abc', 'p2': { '$ne': true }, 'p3': 10, 'p4': false, 'nested.p5': 'abcd' }'` - - - -### `get-vectors` - -Fetch vectors from a Vectorize index using the provided ids. - -```sh -npx wrangler vectorize get-vectors [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index from which vectors need to be fetched. -- `--ids` - - List of ids for which vectors must be fetched. - - - -### `delete-vectors` - -Delete vectors in a Vectorize index using the provided ids. - -```sh -npx wrangler vectorize delete-vectors [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index from which vectors need to be deleted. -- `--ids` - - List of ids corresponding to the vectors that must be deleted. - - - -### `create-metadata-index` - -Enable metadata filtering on the specified property. - -```sh -npx wrangler vectorize create-metadata-index [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index for which metadata index needs to be created. -- `--property-name` - - Metadata property for which metadata filtering should be enabled. -- `--type` - - Data type of the property. Must be one of `string`, `number`, or `boolean`. - - - -### `list-metadata-index` - -List metadata properties on which metadata filtering is enabled. - -```sh -npx wrangler vectorize list-metadata-index [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index for which metadata indexes needs to be fetched. - - - -### `delete-metadata-index` - -Disable metadata filtering on the specified property. - -```sh -npx wrangler vectorize delete-metadata-index [OPTIONS] -``` - -- `INDEX_NAME` - - The name of the Vectorize index for which metadata index needs to be disabled. -- `--property-name` - - Metadata property for which metadata filtering should be disabled. - - + --- @@ -762,7 +547,7 @@ wrangler secrets-store store create default --remote ✅ Created store! (Name: default, ID: 2e2a82d317134506b58defbe16982d54) ``` -### delete +### delete Delete a store within Secrets Store. diff --git a/src/content/partials/workers/wrangler-commands/vectorize.mdx b/src/content/partials/workers/wrangler-commands/vectorize.mdx new file mode 100644 index 000000000000000..f9dbe0b39d1b9ca --- /dev/null +++ b/src/content/partials/workers/wrangler-commands/vectorize.mdx @@ -0,0 +1,196 @@ +--- +{} +--- + +import { Render, AnchorHeading, Type, MetaInfo } from "~/components"; + + + +Creates a new vector index, and provides the binding and name that you will put in your Wrangler file. + +```sh +npx wrangler vectorize create [--dimensions=] [--metric=] [--description=] +``` + +- `INDEX_NAME` + - The name of the new index to create. Must be unique for an account and cannot be changed after creation. +- `--dimensions` + - The vector dimension width to configure the index for. Cannot be changed after creation. +- `--metric` + - The distance metric to use for calculating vector distance. Must be one of `cosine`, `euclidean`, or `dot-product`. +- `--description` + - A description for your index. +- `--deprecated-v1` + - Create a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). + + + +List all Vectorize indexes in your account, including the configured dimensions and distance metric. + +```sh +npx wrangler vectorize list +``` + +- `--deprecated-v1` + - List legacy Vectorize indexes. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). + + + +Get details about an individual index, including its configuration. + +```sh +npx wrangler vectorize get +``` + +- `INDEX_NAME` + - The name of the index to fetch details for. +- `--deprecated-v1` + - Get a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). + + + +Get some additional information about an individual index, including the vector count and details about the last processed mutation. + +```sh +npx wrangler vectorize info +``` + +- `INDEX_NAME` + - The name of the index to fetch details for. + + + +Delete a Vectorize index. + +```sh +npx wrangler vectorize delete [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index to delete. +- `--force` + - Skip confirmation when deleting the index (Note: This is not a recoverable operation). +- `--deprecated-v1` + - Delete a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). + + + +Insert vectors into an index. + +```sh +npx wrangler vectorize insert [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index to upsert vectors in. +- `--file` + - A file containing the vectors to insert in newline-delimited JSON (JSON) format. +- `--batch-size` + - The number of vectors to insert at a time (default: `1000`). +- `--deprecated-v1` + - Insert into a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy). + + + +Upsert vectors into an index. Existing vectors in the index would be overwritten. + +```sh +npx wrangler vectorize upsert [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index to upsert vectors in. +- `--file` + - A file containing the vectors to insert in newline-delimited JSON (JSON) format. +- `--batch-size` + - The number of vectors to insert at a time (default: `5000`). + + + +Query a Vectorize index for similar vectors. + +```sh +npx wrangler vectorize query [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index to query. +- `--vector` + - Vector against which the Vectorize index is queried. Either this or the `vector-id` param must be provided. +- `--vector-id` + - Identifier for a vector that is already present in the index against which the index is queried. Either this or the `vector` param must be provided. +- `--top-k` + - The number of vectors to query (default: `5`). +- `--return-values` + - Enable to return vector values in the response (default: `false`). +- `--return-metadata` + - Enable to return vector metadata in the response. Must be one of `none`, `indexed`, or `all` (default: `none`). +- `--namespace` + - Query response to only include vectors from this namespace. +- `--filter` + - Filter vectors based on this metadata filter. Example: `'{ 'p1': 'abc', 'p2': { '$ne': true }, 'p3': 10, 'p4': false, 'nested.p5': 'abcd' }'` + + + +Fetch vectors from a Vectorize index using the provided ids. + +```sh +npx wrangler vectorize get-vectors [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index from which vectors need to be fetched. +- `--ids` + - List of ids for which vectors must be fetched. + + + +Delete vectors in a Vectorize index using the provided ids. + +```sh +npx wrangler vectorize delete-vectors [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index from which vectors need to be deleted. +- `--ids` + - List of ids corresponding to the vectors that must be deleted. + + + +Enable metadata filtering on the specified property. + +```sh +npx wrangler vectorize create-metadata-index [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index for which metadata index needs to be created. +- `--property-name` + - Metadata property for which metadata filtering should be enabled. +- `--type` + - Data type of the property. Must be one of `string`, `number`, or `boolean`. + + + +List metadata properties on which metadata filtering is enabled. + +```sh +npx wrangler vectorize list-metadata-index [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index for which metadata indexes needs to be fetched. + + + +Disable metadata filtering on the specified property. + +```sh +npx wrangler vectorize delete-metadata-index [OPTIONS] +``` + +- `INDEX_NAME` + - The name of the Vectorize index for which metadata index needs to be disabled. +- `--property-name` + - Metadata property for which metadata filtering should be disabled.