---
title: Storyblok CLI
description: The Storyblok CLI manages spaces from the terminal through the Management API, covering content, schemas, assets, and migrations.
url: https://www.storyblok.com/docs/tooling/cli
---

# Storyblok CLI

The `storyblok` CLI scaffolds Storyblok projects and manages spaces from the terminal through the Management API.

Run `storyblok --help` to list commands, or `storyblok <command> --help` for one command.

## Docs

-   [Setup](/docs/tooling/cli/setup)Install the CLI and set defaults in `storyblok.config.ts`. Read once during setup, and again when the same flags repeat across commands.
-   [Global options](/docs/tooling/cli/global-options)Flags every command accepts. Read when setting region, space, concurrency, or logging.

## Commands

The following sections group the commands by domain.

### Account

-   [login](/docs/tooling/cli/account/login)Authenticate with a password or a personal access token. Read when first authenticating, or when setting up CI.
-   [logout](/docs/tooling/cli/account/logout)Remove stored credentials and end the session. Read when switching accounts.
-   [signup](/docs/tooling/cli/account/signup)Open the sign-up page in the browser. Read when creating a first account.
-   [user](/docs/tooling/cli/account/user)Show the authenticated account and its region. Read when checking which account is active.

### Assets

-   [assets pull](/docs/tooling/cli/assets/pull)Download assets, metadata, and folders to a local directory. Read when exporting assets from a space.
-   [assets push](/docs/tooling/cli/assets/push)Upload assets from a directory, a local file, or a remote URL. Read when importing assets or syncing them between spaces.

### Components

-   [components pull](/docs/tooling/cli/components/pull)Download component schemas, groups, presets, and tags. Read when exporting a component library.
-   [components push](/docs/tooling/cli/components/push)Upload component schemas, groups, presets, and tags. Read when applying a local component library to a space.

### Datasources

-   [datasources delete](/docs/tooling/cli/datasources/delete)Delete a datasource by name or ID. Read when removing a datasource from a space.
-   [datasources pull](/docs/tooling/cli/datasources/pull)Download datasources and their entries. Read when exporting datasources.
-   [datasources push](/docs/tooling/cli/datasources/push)Upload datasources and their entries. Read when applying local datasources to a space.

### Languages

-   [languages pull](/docs/tooling/cli/languages/pull)Download the languages configured in a space. Read when setting up internationalization locally.

### Logs

-   [logs list](/docs/tooling/cli/logs/list)List the logs the CLI wrote per space. Read when diagnosing a past command.
-   [logs prune](/docs/tooling/cli/logs/prune)Delete old logs. Read when clearing local disk.

### Migrations

-   [migrations generate](/docs/tooling/cli/migrations/generate)Create migration files for specific components. Read when starting a content migration.
-   [migrations rollback](/docs/tooling/cli/migrations/rollback)Revert a migration from its snapshot. Read when a migration produced the wrong result.
-   [migrations run](/docs/tooling/cli/migrations/run)Execute migration files against stories. Read when applying a content migration.

### Project

-   [create](/docs/tooling/cli/project/create)Scaffold a new project with your preferred technology. Read when starting a project from scratch.

### Reports

-   [reports list](/docs/tooling/cli/reports/list)List the reports the CLI wrote per space. Read when reviewing the outcome of a past command.
-   [reports prune](/docs/tooling/cli/reports/prune)Delete old reports. Read when clearing local disk.

### Schema

-   [schema init](/docs/tooling/cli/schema/init)Write the current schema of a space as TypeScript files. Read when adopting a code-defined schema.
-   [schema push](/docs/tooling/cli/schema/push)Diff a local schema against a space and apply the changes. Read when deploying schema changes.
-   [schema rollback](/docs/tooling/cli/schema/rollback)Revert a space to the state captured before a push. Read when a schema push went wrong.
-   [schema validate](/docs/tooling/cli/schema/validate)Check a local schema for structural problems. Read when verifying a schema before pushing it.

### Stories

-   [stories find](/docs/tooling/cli/stories/find)Search a space for stories that match filters and print them as JSON Lines. Read when auditing content or selecting stories for a script.
-   [stories pull](/docs/tooling/cli/stories/pull)Download stories to a local directory. Read when exporting content.
-   [stories push](/docs/tooling/cli/stories/push)Upload stories from a local directory. Read when importing content or syncing between spaces.
-   [stories validate](/docs/tooling/cli/stories/validate)Check every story in a space against a local schema. Read when auditing content against a schema.

### Types

-   [types generate](/docs/tooling/cli/types/generate)Generate TypeScript definitions from pulled components. Read when typing Storyblok content in a project.

## Pagination

-   [Next: Setup](/docs/tooling/cli/setup)
