> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# baseten drive

> Manage drives (PRE-RELEASE)

> [!NOTE]
>
> PRE-RELEASE: Drive commands are not GA yet. Their arguments, flags, and output may change.

[Drives](https://docs.baseten.co/drives/overview.md) are shared storage that outlives sandboxes, and many sandboxes can mount the same drive at once. Create one, then mount it in a running sandbox with [`baseten sandbox drive mount`](https://docs.baseten.co/reference/cli/baseten/sandbox#drive). Only sandboxes in the drive's region can mount it.

## list

```sh theme={"system"}
baseten drive list [OPTIONS]
```

Lists the team's drives, newest first, up to `--limit`. Filter by `--query` or repeatable `--status`. Labels aren't listed. Read them with [`drive describe`](#describe).

### Options

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies `--output` json (or jsonl for streamed commands)

**--limit** `INTEGER` (default: 1000)

Most drives to list. 0 lists all.

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--query** `TEXT`

Search over drive names.

**--status** `TEXT (repeatable)`

Only drives with one of these statuses. Repeatable.

One of: `deleting`, `deployed`, `deploying`, `failed`

**--team** `TEXT`

Team name or ID to list drives of. Defaults to your only team; required if you belong to more than one. Run 'baseten org team list' to see teams.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

List drives

```sh theme={"system"}
baseten drive list
```

List only failed drives

```sh theme={"system"}
baseten drive list --status failed
```

### Filter output with `--jq`

Print the name of every drive

```sh theme={"system"}
baseten drive list --jq '.items[].name'
```

### Output

**Text mode (`--output text`):** Table with columns: NAME, STATUS, REGION, CREATED. Prints "No drives found." to stderr when the list is empty, and a note to stderr when `--limit` left some out.

**JSON mode (`--output json`):** Go output type `cmd.DriveList`.

## describe

```sh theme={"system"}
baseten drive describe [OPTIONS]
```

Retrieves one drive's record: status, region, and labels.

### Options

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies `--output` json (or jsonl for streamed commands)

**--name** `TEXT` *required*

Name of the drive.

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--team** `TEXT`

Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run 'baseten org team list' to see teams.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Describe a drive

```sh theme={"system"}
baseten drive describe --name my-drive
```

### Filter output with `--jq`

Print the drive's region

```sh theme={"system"}
baseten drive describe --name my-drive --jq '.region'
```

### Output

**Text mode (`--output text`):** One field per line describing the drive. Empty fields are left out.

**JSON mode (`--output json`):** Go output type `managementapi.Drive`.

## create

```sh theme={"system"}
baseten drive create [OPTIONS]
```

Creates a drive and prints its record.

### Options

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies `--output` json (or jsonl for streamed commands)

**--label** `TEXT (repeatable)`

Label as KEY=VALUE. Repeatable.

**--name** `TEXT`

Unique name of the drive. The server generates one when omitted.

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--region** `TEXT`

Region of the drive. Only sandboxes in the same region can mount it. Defaults to the default sandbox region.

**--team** `TEXT`

Team name or ID to create the drive in. Defaults to your only team; required if you belong to more than one. Run 'baseten org team list' to see teams.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Create a drive

```sh theme={"system"}
baseten drive create --name my-drive
```

Create one in a specific region with labels

```sh theme={"system"}
baseten drive create --name my-drive --region us-was-1 --label team=cli
```

### Filter output with `--jq`

Create a drive and print its status

```sh theme={"system"}
baseten drive create --name my-drive --jq '.status'
```

### Output

**Text mode (`--output text`):** One field per line describing the created drive. Empty fields are left out.

**JSON mode (`--output json`):** Go output type `managementapi.Drive`.

## update

```sh theme={"system"}
baseten drive update [OPTIONS]
```

Replaces a drive's labels. Any `--label` replaces all of them, and `--clear-labels` removes them all. A drive's name and region can't change.

### Options

**--clear-labels** `BOOL`

Remove all of the drive's labels. Cannot be combined with `--label`.

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies `--output` json (or jsonl for streamed commands)

**--label** `TEXT (repeatable)`

Label as KEY=VALUE, replacing all of the drive's labels. Repeatable. Cannot be combined with `--clear-labels`.

**--name** `TEXT` *required*

Name of the drive.

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--team** `TEXT`

Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run 'baseten org team list' to see teams.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Replace a drive's labels

```sh theme={"system"}
baseten drive update --name my-drive --label env=dev
```

### Filter output with `--jq`

Replace a drive's labels and print them

```sh theme={"system"}
baseten drive update --name my-drive --label env=dev --jq '.labels'
```

### Output

**Text mode (`--output text`):** One field per line describing the updated drive. Empty fields are left out.

**JSON mode (`--output json`):** Go output type `managementapi.Drive`.

## delete

```sh theme={"system"}
baseten drive delete [OPTIONS]
```

Deletes a drive and all its data. You can't undo it. Deletion continues after this command returns.

### Options

**-q, --jq** `TEXT`

Filter JSON output with a jq expression; implies `--output` json (or jsonl for streamed commands)

**--name** `TEXT` *required*

Name of the drive.

**-o, --output** `TEXT` (default: text)

Output format

One of: `text`, `json`, `jsonl`, `none`

**--profile** `TEXT`

Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile

**--team** `TEXT`

Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run 'baseten org team list' to see teams.

**--yes** `BOOL`

Skip the interactive confirmation prompt. Required when stdin is not a terminal.

**-v, --verbose** `BOOL`

Enable verbose logging

### Examples

Delete a drive without the confirmation prompt

```sh theme={"system"}
baseten drive delete --name my-drive --yes
```

### Filter output with `--jq`

Delete a drive and print its status

```sh theme={"system"}
baseten drive delete --name my-drive --yes --jq '.status'
```

### Output

**Text mode (`--output text`):** A confirmation line on stderr.

**JSON mode (`--output json`):** Go output type `managementapi.Drive`.

The drive's record as deletion starts.
