Skip to content

stories pull

Downloads stories 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. All stories are saved as individual JSON files ({slug}_{UUID}.json).

Terminal window
.storyblok/
└── stories/
└── <space-id>/
└── <story>.json
Terminal window
storyblok stories pull [flags]
Flag Type Description
--space -s integer Required. The ID of the Storyblok space to pull stories from.
--path, -p string Optional. Specify a custom path for story files. Defaults to .storyblok/stories/<space-id>.
--query, -q string Optional. Filter stories using query parameters.
--dry-run, -d boolean Optional. Preview changes without applying them to the local directory.
--starts-with, -sw string Optional. A path prefix to filter stories to pull.

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

Terminal window
# Pull stories from a space
storyblok stories pull
# Pull stories from a space, filtering by query and previewing changes without applying them to the local directory
storyblok stories pull --query "[highlighted][in]=true" --dry-run
# Pull stories from a space, filtering by path prefix
storyblok stories pull --starts-with "blog/"

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.