---
title: assets pull
description: Downloads assets, asset metadata, and asset folders from a Storyblok space and saves them to a local directory.
url: https://www.storyblok.com/docs/tooling/cli/assets-pull
---

# assets pull

Downloads assets, asset metadata, and asset folders from a Storyblok space and saves them to a local directory.

The command saves to the following folder structure and recursively creates it if it doesn’t exist yet. Space assets live under `<space-id>/`, and assets from the organization’s [shared asset libraries](/docs/tooling/cli/assets-push#shared-asset-libraries) live under `shared/<library-id>/`.

```bash
.storyblok/
└── assets/
    ├── <space-id>/
    │   ├── <asset>.jpg
    │   ├── manifest.jsonl
    │   └── folders/
    │       ├── <folder>.json
    │       └── manifest.jsonl
    └── shared/
        └── <library-id>/
            ├── <asset>.jpg
            ├── manifest.jsonl
            └── folders/
                ├── <folder>.json
                └── manifest.jsonl
```

## Usage

```bash
storyblok assets pull [flags]
```

## Flags

| Flag | Type | Description |
| --- | --- | --- |
| `--space` `-s` | integer | _Required._ The ID of the Storyblok space to pull assets from. |
| `--target` | string | _Optional._ Select the source: `with-referenced` (the space plus the [shared libraries](/docs/tooling/cli/assets-push#shared-asset-libraries) assets its content references), `all` (the space and all accessible shared libraries), `space` (the space only), or `shared` (shared libraries only). Defaults to `with-referenced`. |
| `--path`, `-p` | string | _Optional._ Specify a custom path for asset files. Defaults to `.storyblok/assets/<space-id>`. |
| `--asset-token` | string | _Optional._ Provide an asset token to access [private assets](/docs/concepts/assets#private-assets). |
| `--query`, `-q` | string | _Optional._ Filter assets using [query parameters](/docs/api/management/assets/retrieve-multiple-assets#query-parameters). |
| `--dry-run`, `-d` | boolean | _Optional._ Preview changes without applying them to the local directory. |

## Examples

The following examples assume that a `space` has been defined in a configuration file.

```bash
# Pull all assets from a space
storyblok assets pull
# Pull all assets from a space using an asset token to access private assets
storyblok assets pull --asset-token ASSET_TOKEN
# Pull all assets from a space, filtering by query and previewing changes without applying them
storyblok assets pull --query "search=my-file.jpg&with_tags=tag1,tag2"
# Pull only the shared library assets the space can access
storyblok assets pull --target shared
```

## Pagination

-   [Previous: Global options](/docs/tooling/cli/global-options)
-   [Next: assets push](/docs/tooling/cli/assets-push)
