Storyblok CLI
$ storyblok Official Med RiskStoryblok CLI (storyblok) automates headless CMS workflows including component schema pull/push, TypeScript type generation, migrations, and space asset operations. Supports --space, --region, --token, and storyblok.config.ts configuration for CI/CD pipelines.
npm install -g storyblok storyblok writes local component JSON schemas and TypeScript types directly into the frontend repo and runs local migration scripts against Git-tracked files.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --token, --space, --region, and storyblok.config.ts for scripted runs, though it lacks a universal --json flag on CLI output.
- Non-interactive auth via
storyblok login --tokenand--space - Pulls component schemas natively as local JSON files
Read/pull and local type generation are safe, while push and migration commands mutate remote CMS schemas without a universal --dry-run.
- Pull-then-diff Git workflow protects schema edits before
push
Node.js CLI installable globally via npm or ad-hoc via npx storyblok on macOS, Linux, and Windows.
- Available via
npm install -g storyblokandnpx storyblok
Streamlines CMS schema-as-code, TypeScript generation, and content migrations inside frontend repositories.
- Unifies
components,types,migrations, andassetscommands
Official Storyblok monorepo (storyblok/monoblok) under MIT license.
- Maintained directly by Storyblok
Well-documented on storyblok.com/docs and storyblok/monoblok README.
- Official Storyblok CLI documentation
Security, Auth & Guardrails
Stores personal access tokens in ~/.storyblok/ (via storyblok login --token <TOKEN> --region <REGION>) and supports --token flag or storyblok.config.ts settings.
MIT open-source CLI; Storyblok offers a free community space plan and paid enterprise tiers.
# Storyblok CLI (storyblok) Agent Rules - Authenticate non-interactively with `storyblok login --token "$STORYBLOK_TOKEN" --region eu` or pass `--token`. - Always pass explicit `--space <id>` so commands target the intended environment. - Pull and inspect local diff before running `storyblok components push` or migrations.
Agent-Ready Command Recipes
Safe Read-Only Queries
storyblok components pull --space <space_id>
Downloads component definitions from the Storyblok space into local JSON schema files without modifying remote CMS state.
storyblok types generate --space <space_id>
Generates local TypeScript definitions from pulled Storyblok component JSON files.
Controlled Writes & Previews
storyblok components push --space <space_id>
Uploads local component schema edits back to the target Storyblok space.
Strengths for Agents
- + Syncs CMS component schemas as Git-friendly JSON files and generates TypeScript types.
- + Supports
--token,--space, and--regionflags for CI/CD automation.
Caveats & Pitfalls
- ! Lacks a global
--jsonflag for CLI diagnostic logs. - ! Some interactive setup commands (
storyblok create) prompt unless flags such as--skip-spaceare passed.