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

# storage:pull

> Download objects from Cloudflare R2, Bunny, or S3 into a local folder.

Pull objects from object storage into a local folder. Talos reads the provider profile saved by [`credentials:create`](/cli/commands/credentials-create), lists the remote prefix, and writes matching objects under `--destination`.

## Usage

```bash theme={null}
talos storage:pull [options]
```

## Examples

Pull a Cloudflare R2 prefix into a local folder:

```bash theme={null}
talos storage:pull --provider=cloudflare --from=my-bucket/site --destination=dist
```

Pull from Amazon S3:

```bash theme={null}
talos storage:pull --provider=s3 --from=site --destination=dist
```

Unpack downloaded zip archives:

```bash theme={null}
talos storage:pull --provider=bunny --from=releases --destination=out --unzip
```

Suppress progress and summary output:

```bash theme={null}
talos storage:pull --provider=cloudflare --from=my-bucket/site --destination=dist --silent
```

## Options

| Option          | Description                                                                          | Default             |
| --------------- | ------------------------------------------------------------------------------------ | ------------------- |
| `--provider`    | Storage provider: `cloudflare` (`r2` alias), `bunny`, or `s3`.                       | Prompted if omitted |
| `--from`        | Remote bucket path to pull. For Cloudflare R2, the first segment is the bucket name. | Prompted if omitted |
| `--destination` | Local folder the content lands in.                                                   | Prompted if omitted |
| `--unzip`       | Unpack every downloaded `.zip` archive instead of writing it as a file.              | `false`             |
| `--silent`      | Hide progress, per-object failures, warnings, and summary output.                    | `false`             |
| `--cwd`         | Working directory used to resolve `--destination`.                                   | Current directory   |

## Providers

| Provider     | Credentials file                      | Source handling                                                                           |
| ------------ | ------------------------------------- | ----------------------------------------------------------------------------------------- |
| `cloudflare` | `~/.talos/credentials/cloudflare.yml` | `--from` must start with the R2 bucket name, as in `my-bucket/assets`.                    |
| `bunny`      | `~/.talos/credentials/bunny.yml`      | `--from` is used as the object key prefix.                                                |
| `s3`         | `~/.talos/credentials/s3.yml`         | The bucket comes from the credentials profile; `--from` is used as the object key prefix. |

## Download behavior

Talos lists objects under the remote prefix. If the listing is empty, it treats `--from` as one exact object key and tries to download that object.

Each object keeps the path it has under the prefix. If the key exactly equals the prefix, Talos keeps only the key's file name. Keys ending in `/` are ignored.

## Safety

Remote keys are treated as untrusted. Talos refuses keys whose local path would escape the destination folder. When `--unzip` is set, zip entries that would escape the archive output folder are dropped.

## Unzipping

With `--unzip`, only downloaded keys ending in `.zip` are unpacked. The archive unpacks into a folder named after the archive without the `.zip` extension; for example, `dist.zip` unpacks into `dist`.

## Output

Without `--silent`, Talos shows a loader while downloads run. On success it prints `Pulled N object(s) into <destination>`. If any object fails, it prints each failed key and message, prints a pulled/failed summary, and exits with code 1.
