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>/.
.storyblok/└── assets/ ├── <space-id>/ │ ├── <asset>.jpg │ ├── manifest.jsonl │ └── folders/ │ ├── <folder>.json │ └── manifest.jsonl └── shared/ └── <library-id>/ ├── <asset>.jpg ├── manifest.jsonl └── folders/ ├── <folder>.json └── manifest.jsonlstoryblok 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. |
Examples
Section titled “Examples”The following examples assume that a space has been defined in a configuration file.
# Pull all assets from a spacestoryblok assets pull# Pull all assets from a space using an asset token to access private assetsstoryblok assets pull --asset-token ASSET_TOKEN# Pull all assets from a space, filtering by query and previewing changes without applying themstoryblok assets pull --query "search=my-file.jpg&with_tags=tag1,tag2"# Pull only the shared library assets the space can accessstoryblok assets pull --target sharedWas this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community