---
title: stories push
description: Pushes stories from a local directory to a Storyblok space.
url: https://www.storyblok.com/docs/tooling/cli/stories-push
---

# stories push

Pushes stories from a local directory to a Storyblok space.

## Prerequisites

-   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.

## Usage

```bash
storyblok stories push [flags]
```

## 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. |

## Examples

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

```bash
# 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
```

## Story manifest

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.

## Pagination

-   [Previous: stories pull](/docs/tooling/cli/stories-pull)
-   [Next: stories validate](/docs/tooling/cli/stories-validate)
