---
title: stories pull
description: Downloads stories from a Storyblok space and saves them to a local directory.
url: https://www.storyblok.com/docs/tooling/cli/stories-pull
---

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

```bash
.storyblok/
└── stories/
    └── <space-id>/
        └── <story>.json
```

## Usage

```bash
storyblok stories pull [flags]
```

## 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](/docs/api/management/stories/retrieve-multiple-stories#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. |

## Examples

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

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

## Pagination

-   [Previous: signup](/docs/tooling/cli/signup)
-   [Next: stories push](/docs/tooling/cli/stories-push)
