Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/configuration/secrets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
219 changes: 2 additions & 217 deletions src/content/docs/workers/wrangler/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <INDEX_NAME> [--dimensions=<NUM_DIMENSIONS>] [--metric=<DISTANCE_METRIC>] [--description=<DESCRIPTION>]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the new index to create. Must be unique for an account and cannot be changed after creation.
- `--dimensions` <Type text="number" /> <MetaInfo text="required" />
- The vector dimension width to configure the index for. Cannot be changed after creation.
- `--metric` <Type text="string" /> <MetaInfo text="required" />
- The distance metric to use for calculating vector distance. Must be one of `cosine`, `euclidean`, or `dot-product`.
- `--description` <Type text="string" /> <MetaInfo text="optional" />
- A description for your index.
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
- Create a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).

<Render file="wrangler-commands/global-flags" product="workers" />

### `list`

List all Vectorize indexes in your account, including the configured dimensions and distance metric.

```sh
npx wrangler vectorize list
```

- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
- List legacy Vectorize indexes. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).

<Render file="wrangler-commands/global-flags" product="workers" />

### `get`

Get details about an individual index, including its configuration.

```sh
npx wrangler vectorize get <INDEX_NAME>
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the index to fetch details for.
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
- Get a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).

<Render file="wrangler-commands/global-flags" product="workers" />

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

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the index to fetch details for.

<Render file="wrangler-commands/global-flags" product="workers" />

### `delete`

Delete a Vectorize index.

```sh
npx wrangler vectorize delete <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index to delete.
- `--force` <Type text="boolean" /> <MetaInfo text="optional" />
- Skip confirmation when deleting the index (Note: This is not a recoverable operation).
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
- Delete a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).

<Render file="wrangler-commands/global-flags" product="workers" />

### `insert`

Insert vectors into an index.

```sh
npx wrangler vectorize insert <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index to upsert vectors in.
- `--file` <Type text="string" /> <MetaInfo text="required" />
- A file containing the vectors to insert in newline-delimited JSON (JSON) format.
- `--batch-size` <Type text="number" /> <MetaInfo text="optional" />
- The number of vectors to insert at a time (default: `1000`).
- `--deprecated-v1` <Type text="boolean" /> <MetaInfo text="optional" />
- Insert into a legacy Vectorize index. Please note that legacy Vectorize indexes are on a [deprecation path](/vectorize/reference/transition-vectorize-legacy).

<Render file="wrangler-commands/global-flags" product="workers" />

### `upsert`

Upsert vectors into an index. Existing vectors in the index would be overwritten.

```sh
npx wrangler vectorize upsert <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index to upsert vectors in.
- `--file` <Type text="string" /> <MetaInfo text="required" />
- A file containing the vectors to insert in newline-delimited JSON (JSON) format.
- `--batch-size` <Type text="number" /> <MetaInfo text="optional" />
- The number of vectors to insert at a time (default: `5000`).

<Render file="wrangler-commands/global-flags" product="workers" />

### `query`

Query a Vectorize index for similar vectors.

```sh
npx wrangler vectorize query <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index to query.
- `--vector` <Type text="array" /> <MetaInfo text="optional" />
- Vector against which the Vectorize index is queried. Either this or the `vector-id` param must be provided.
- `--vector-id` <Type text="string" /> <MetaInfo text="optional" />
- 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` <Type text="number" /> <MetaInfo text="optional" />
- The number of vectors to query (default: `5`).
- `--return-values` <Type text="boolean" /> <MetaInfo text="optional" />
- Enable to return vector values in the response (default: `false`).
- `--return-metadata` <Type text="string" /> <MetaInfo text="optional" />
- Enable to return vector metadata in the response. Must be one of `none`, `indexed`, or `all` (default: `none`).
- `--namespace` <Type text="string" /> <MetaInfo text="optional" />
- Query response to only include vectors from this namespace.
- `--filter` <Type text="string" /> <MetaInfo text="optional" />
- Filter vectors based on this metadata filter. Example: `'{ 'p1': 'abc', 'p2': { '$ne': true }, 'p3': 10, 'p4': false, 'nested.p5': 'abcd' }'`

<Render file="wrangler-commands/global-flags" product="workers" />

### `get-vectors`

Fetch vectors from a Vectorize index using the provided ids.

```sh
npx wrangler vectorize get-vectors <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index from which vectors need to be fetched.
- `--ids` <Type text="array" /> <MetaInfo text="required" />
- List of ids for which vectors must be fetched.

<Render file="wrangler-commands/global-flags" product="workers" />

### `delete-vectors`

Delete vectors in a Vectorize index using the provided ids.

```sh
npx wrangler vectorize delete-vectors <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index from which vectors need to be deleted.
- `--ids` <Type text="array" /> <MetaInfo text="required" />
- List of ids corresponding to the vectors that must be deleted.

<Render file="wrangler-commands/global-flags" product="workers" />

### `create-metadata-index`

Enable metadata filtering on the specified property.

```sh
npx wrangler vectorize create-metadata-index <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index for which metadata index needs to be created.
- `--property-name` <Type text="string" /> <MetaInfo text="required" />
- Metadata property for which metadata filtering should be enabled.
- `--type` <Type text="string" /> <MetaInfo text="required" />
- Data type of the property. Must be one of `string`, `number`, or `boolean`.

<Render file="wrangler-commands/global-flags" product="workers" />

### `list-metadata-index`

List metadata properties on which metadata filtering is enabled.

```sh
npx wrangler vectorize list-metadata-index <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index for which metadata indexes needs to be fetched.

<Render file="wrangler-commands/global-flags" product="workers" />

### `delete-metadata-index`

Disable metadata filtering on the specified property.

```sh
npx wrangler vectorize delete-metadata-index <INDEX_NAME> [OPTIONS]
```

- `INDEX_NAME` <Type text="string" /> <MetaInfo text="required" />
- The name of the Vectorize index for which metadata index needs to be disabled.
- `--property-name` <Type text="string" /> <MetaInfo text="required" />
- Metadata property for which metadata filtering should be disabled.

<Render file="wrangler-commands/global-flags" product="workers" />
<Render file="wrangler-commands/vectorize" product="workers" />

---

Expand Down Expand Up @@ -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.

Expand Down
Loading
Loading