Storyblok CLI v4.11.0: Config file, logging system, and more
Storyblok is the first headless CMS that works for developers & marketers alike.
The Storyblok CLI v4.11.0 release introduces a new configuration system, a logging and reporting workflow, and several updates to existing commands. These improvements were developed in response to customer feedback and common pain points, helping teams create consistent setups, reuse shared defaults, and review results from long-running operations more effectively.
Config file
The CLI can now read defaults from configuration files, so you do not have to repeat the same flags for every command. The configuration system supports multiple file formats and resolves settings through layered files.
A basic configuration file looks like this:
import { defineConfig } from "storyblok/config";
export default defineConfig({
space: "123456",
}); After you add this file to the project root, the CLI automatically applies these settings:
storyblok components pull You can read all the configuration options in our CLI docummentation.
Layered config resolution
The CLI merges configuration files from three locations. Higher layers override lower layers.
- Home directory:
~/.storyblok/config.* - Workspace folder:
<project>/.storyblok/config.* - Project root:
<project>/storyblok.config.*
This structure lets teams share project settings while keeping tokens and personal preferences in local files. You can read more in details here.
Environment variables
All config files run inside Node, and the CLI loads environment variables through dotenv/config. You can reference secrets and per-environment values through process.env.
export default defineConfig({
region: process.env.STORYBLOK_REGION ?? "eu",
space: process.env.STORYBLOK_SPACE_ID,
api: {
maxRetries: Number(process.env.STORYBLOK_MAX_RETRIES ?? 5),
},
}); Environment variables help teams adjust settings for staging, production, or CI workflows without changing the config file.
Performance controls
The config file supports two performance settings:
api.maxConcurrencycontrols how many API requests run in parallelapi.maxRetriesdefines how many times a failed request is retried
These settings help large migrations run more reliably.
Override flags
Every config value can be overridden with a CLI flag. This helps you apply per-run adjustments.
Examples:
storyblok components pull --verbose
storyblok components pull --api-max-retries 10
storyblok components pull --no-log-file-enabled You can read more details here.
Logging and reporting
The CLI now generates logs and reports for migration commands. These outputs help you review what happened during a run, diagnose issues, and keep an audit trail of changes.
Where logs and reports are stored
Logging to files and report generation are enabled by default.
Files are stored in your project under:
.storyblok/logs/SPACE/
.storyblok/reports/SPACE/ Each run is written to a timestamped file:
.storyblok/logs/<SPACE>/storyblok-migrations-run-<RUN_ID>.jsonl
.storyblok/reports/<SPACE>/storyblok-migrations-run-<RUN_ID>.json This structure keeps logs and reports grouped by space and by command.
Commands for managing logs and reports
The release includes new commands that let you inspect and remove stored files:
storyblok migrations run --no-log-file-enabled
storyblok migrations run --no-report-enabled These commands help you keep the .storyblok directory clean and make it easier to locate specific runs.
Disabling logging or reporting
You can disable logs or reports through flags or through the config file:
storyblok migrations run --no-log-file-enabled
storyblok migrations run --no-report-enabled Both options give you full control over what the CLI writes to disk.
Currently, logging and reporting are available only for migration commands. Support for additional commands will be added in the future.
Improvements
--from on push
The --from flag on the push commands helps you control which space acts as the source during transfers.
storyblok datasources push --space STAGING_SPACE_ID --from PROD_SPACE_ID
storyblok components push --space STAGING_SPACE_ID --from PROD_SPACE_ID Datasource type generation
The CLI can now generate TypeScript definitions for datasources. When your components reference a datasource, the CLI generates the corresponding datasource type and automatically links it to the component’s TypeScript definitions. This improves editor autocomplete, strengthens type safety, and helps prevent type errors in larger codebases.
storyblok create
The storyblok create command now supports the --token flag. You can use any of the blueprint templates to start a new project or to add a template to an existing space.
If you provide a token, the CLI uses your current space.
storyblok create --template nuxt --token STORYBLOK_DELIVERY_API_TOKEN | Resource | Link |
|---|---|
| CLI GitHub repository | https://github.com/storyblok/monoblok |
| storyblok NPM package | https://www.npmjs.com/package/storyblok |
| Storyblok Documentation | https://www.storyblok.com/docs |
| Storyblok CLI Documentation | https://www.storyblok.com/docs/packages/storyblok-cli |