Introducing Storyblok CLI v4
Alvaro Saburido

Alvaro Saburido @alvarosabu

About: Creative Software Engineer from 🇻🇪 living in Barcelona, Spain. Developer Experience Engineer at Storyblok Author of TresJS Content Creator @AlvaroDevLabs Former founder of Porsche Digital Bcn.

Location:
Barcelona Spain
Joined:
Dec 9, 2019

Introducing Storyblok CLI v4

Publish Date: Jun 19
1 0

An enterprise-ready, open-source command line to leverage complex operations on top of Storyblok’s Management API with a friendly and renovated interface.

Today, we’re launching Storyblok CLI v4, a complete rebirth of our developer toolkit built for the scale, performance, and polish that modern enterprises expect, yet intuitive and fun for every developer who interacts with it.

Features you will love ✨

1. Full make-over

Who said command line interfaces need to be plain and boring 😜? We present you with a new design for this version.

Image showing the new design for the Storyblok CLI v4

  • Color-coded domain badges – instantly see whether you’re in Components, Migrations, or Types land.
  • Real-time progress spinners + timing – watch each step finish and know exactly how long it took.
  • Success/error icons at a glance – ✅ for done, ❌ for issues, with zero [Object object] noise.
  • Copy-paste-ready paths – the CLI prints where files were saved (e.g. .storyblok/components/…), so you can jump there in one click.
  • Readable in any theme – tested on dark, light, and high-contrast terminals.
  • Consistent typography & padding – no more jittery line breaks when you resize the window.

2. Domain-first command design

The new storyblok <domain> <verb> format keeps related actions together and makes discovery a breeze.

For example, imagine you need to pull components from a space (1234), make local changes, and then push them to a second space (5678).

storyblok components pull --space 1234
Enter fullscreen mode Exit fullscreen mode

This command saves your space components in a dedicated local .storyblok folder. You can later push these changes to our target space.

storyblok components push --space 5678 --from 1234
Enter fullscreen mode Exit fullscreen mode

3. Granular, precision-targeted operations

Ship exactly what you intend. Nothing more, nothing less.

Use-case What it looks like
Push a single component to production storyblok components push button --space 78910
Sync only components matching a glob storyblok components pull "marketing-*" --space 78910
Run a migration on stories matching a query storyblok migrations run --query "[highlighted][in]=true" --space 78910
Combine filters & dry-run storyblok migrations run --starts-with "/en/blog/" --dry-run

These scoped commands are CI-friendly, lightning-fast, and reduce “blast radius” during hot-fixes.

4. File Organization that sparks joy

Good-bye, root-folder clutter. All artifacts now live under a tidy .storyblok directory organised by space, by default.

.storyblok/
├─ components/
        └── YOUR_SPACE_ID/
                ├── components.json      # All components
                ├── groups.json         # Component groups
                ├── presets.json        # Component presets
                └── tags.json           # Component tags
├─ migrations/
└─ types/
Enter fullscreen mode Exit fullscreen mode

You can keep them version-controlled for traceability, or add a single line to .gitignore. Override paths if you need something bespoke by using the --path flag.

5. Sign-up directly from the CLI

First-time user? Kick things off with a single command:

storyblok signup
Enter fullscreen mode Exit fullscreen mode

The storyblok signup command opens a secure registration page in your default browser.

storyblok login
Enter fullscreen mode Exit fullscreen mode

That’s it, you’re ready to pull components or run your first migration.

6. Better error handling & support

Remember those [Object object] stack traces? Use —verbose to get full error details

storyblok components push hero-banner --space 5678 --verbose
Enter fullscreen mode Exit fullscreen mode

Actions now yield errors like the example below.


Error 

 error Component "hero-banner" not found. 
 error Command Error: Component "hero-banner" not found. {
  name: 'Command Error',
  message: 'Component "hero-banner" not found.',
  stack: 'Command Error: Component "hero-banner" not found.\n' +
    '    at Command.<anonymous> (file:///Users/alvarosabu/Projects/storyblok/storyblok-cli-next/dist/index.mjs:2206:21)'
}

Enter fullscreen mode Exit fullscreen mode
  • Actionable logs – perfect for CI pipelines or reporting an issue on Support.
  • Smart retries & back-off – long jobs finish even on flaky networks.
  • Strict typing – predictable error objects your scripts can catch.

Migrating from v3 in one minute 🕒

Commands structure

v3 command v4 command
pull-components components pull
push-components components push
generate-migration migrations generate
run-migration migrations run
generate-typescript-typedefs types generate

Swap verb-domain → , check all the available flags using --help, and you’re done.

For a full overview of all commands available, please refer to the API README in the CLI repository.

What about the old sync command?

This command has not made the jump to v4.

We’re currently re-imagining it as a brand-new, server-side endpoint that will deliver:

  • Faster synchronization
  • higher reliability (the heavy lifting runs on our backend),
  • Better handling of large-scale operations

Until that ships you have two options:

Need Recommended approach
Schema-only transfer (components, groups, tags, presets) Use components pull from the source space, commit the files (or keep them local), then components push to the target space.
Full “everything” sync (stories, folders, roles, datasources) Stay on CLI v3 for this specific job: npm i -g storyblok@v3.36.1 and keep following the v3 docs. github.com

We’ll announce the new sync as soon as the new API endpoint is live—watch this space!


Get started today

npm i -g storyblok@latest          # install v4

storyblok signup && storyblok login     # onboard and authenticate
storyblok --help                        # explore
Enter fullscreen mode Exit fullscreen mode

Found a bug? Want to help shape the future?

  • Report issues & feature requests – open a ticket in our GitHub tracker

    👉 https://github.com/storyblok/monoblok/issues

  • Feeling adventurous? Fork the repository, follow the contributor setup in the root README.md, and submit a pull-request. We review PRs weekly and love community contributions!

Ready to enjoy faster workflows and world-class support?

Install Storyblok CLI v4 now and see what an enterprise-ready command line feels like. 🚀

Comments 0 total

    Add comment