Skip to content

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 live under shared/<library-id>/.

Terminal window
.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
Terminal window
storyblok assets pull [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 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.
--query, -q string Optional. Filter assets using query parameters.
--dry-run, -d boolean Optional. Preview changes without applying them to the local directory.

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

Terminal window
# 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

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.