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.
SetupInstall the CLI and set defaults in
storyblok.config.ts. Read once during setup, and again when the same flags repeat across commands.Global optionsFlags every command accepts. Read when setting region, space, concurrency, or logging.
Commands
Section titled “Commands”The following sections group the commands by domain.
Account
Section titled “Account”loginAuthenticate with a password or a personal access token. Read when first authenticating, or when setting up CI.
logoutRemove stored credentials and end the session. Read when switching accounts.
signupOpen the sign-up page in the browser. Read when creating a first account.
userShow the authenticated account and its region. Read when checking which account is active.
Assets
Section titled “Assets”assets pullDownload assets, metadata, and folders to a local directory. Read when exporting assets from a space.
assets pushUpload assets from a directory, a local file, or a remote URL. Read when importing assets or syncing them between spaces.
Components
Section titled “Components”components pullDownload component schemas, groups, presets, and tags. Read when exporting a component library.
components pushUpload component schemas, groups, presets, and tags. Read when applying a local component library to a space.
Datasources
Section titled “Datasources”datasources deleteDelete a datasource by name or ID. Read when removing a datasource from a space.
datasources pullDownload datasources and their entries. Read when exporting datasources.
datasources pushUpload datasources and their entries. Read when applying local datasources to a space.
Languages
Section titled “Languages”languages pullDownload the languages configured in a space. Read when setting up internationalization locally.
logs listList the logs the CLI wrote per space. Read when diagnosing a past command.
logs pruneDelete old logs. Read when clearing local disk.
Migrations
Section titled “Migrations”migrations generateCreate migration files for specific components. Read when starting a content migration.
migrations rollbackRevert a migration from its snapshot. Read when a migration produced the wrong result.
migrations runExecute migration files against stories. Read when applying a content migration.
Project
Section titled “Project”createScaffold a new project with your preferred technology. Read when starting a project from scratch.
Reports
Section titled “Reports”reports listList the reports the CLI wrote per space. Read when reviewing the outcome of a past command.
reports pruneDelete old reports. Read when clearing local disk.
Schema
Section titled “Schema”schema initWrite the current schema of a space as TypeScript files. Read when adopting a code-defined schema.
schema pushDiff a local schema against a space and apply the changes. Read when deploying schema changes.
schema rollbackRevert a space to the state captured before a push. Read when a schema push went wrong.
schema validateCheck a local schema for structural problems. Read when verifying a schema before pushing it.
Stories
Section titled “Stories”stories findSearch a space for stories that match filters and print them as JSON Lines. Read when auditing content or selecting stories for a script.
stories pullDownload stories to a local directory. Read when exporting content.
stories pushUpload stories from a local directory. Read when importing content or syncing between spaces.
stories validateCheck every story in a space against a local schema. Read when auditing content against a schema.
types generateGenerate TypeScript definitions from pulled components. Read when typing Storyblok content in a project.
Thanks! We received your feedback.
An error occurred. Please try again.
Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
- Need help?Contact support (opens in a new window)
- Something isn’t right?Check system status (opens in a new window)
Get in touch with the Storyblok community