Skip to content

stories push

Pushes stories from a local directory to a Storyblok space.

  • The command expects stories that have previously been pulled from a space using stories pull.
  • Run components pull to keep component schemas up-to-date, allowing for references to be resolved correctly.
Terminal window
storyblok stories push [flags]
Flag Type Description
--space -s integer Required. The ID of the Storyblok space to push stories to.
--from, -f integer Optional. The ID of the source space from which the stories were originally pulled. If not provided, the origin space equals the target space specified via --space.
--path, -p string Optional. Specify a custom path for story files. Defaults to .storyblok/stories/<space-id>.
--dry-run, -d boolean Optional. Preview changes without applying them to Storyblok.
--cleanup boolean Optional. Delete local stories after a successful push.
--publish boolean Optional. Publish stories after a successful push.

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

Terminal window
# Push stories to a space
storyblok stories push
# Push stories to a space previewing changes without applying them to Storyblok
storyblok stories push --dry-run

The command creates a manifest file to keep track of story changes and references when pushing stories (stored under .storyblok/stories/<space-id>/manifest.jsonl). Specifically, it maps source IDs and filenames to target asset IDs and filenames. This serves the following purposes:

  • Idempotency: Prevent duplicate uploads of the same story when running stories push multiple times, recognizing existing stories and updating them instead.
  • Incremental workflows: As the relation between source and target stories is persisted, users can pull, modify, and push single or multiple stories incrementally.
  • Migration: Mapping source and target IDs is crucial for space-to-space migrations in Storyblok as well as CMS migrations from third-party systems to Storyblok.

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.