https://github.com/storyblok/storyblok-cli
Storyblok CLI
https://github.com/storyblok/storyblok-cli
api cli command-line enterprise storyblok
Last synced: 3 months ago
JSON representation
Storyblok CLI
- Host: GitHub
- URL: https://github.com/storyblok/storyblok-cli
- Owner: storyblok
- License: mit
- Created: 2022-12-16T09:13:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-19T12:26:10.000Z (4 months ago)
- Last Synced: 2025-07-03T09:53:15.921Z (3 months ago)
- Topics: api, cli, command-line, enterprise, storyblok
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/storyblok
- Size: 2.49 MB
- Stars: 51
- Watchers: 18
- Forks: 38
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Storyblok CLI
A powerful CLI tool to improve the DX of your Storyblok projects.
## Features
- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Storyblok components, ensuring type safety in your frontend applications
- 🔐 **Authentication** - Secure login system with support for different regions and CI environments
- 🧩 **Component Management** - Pull and push component schemas, groups, presets, and internal tags between spaces
- 🔄 **Migration System** - Generate and run migrations to transform or update field values across your Storyblok content
- 🌐 **Language Management** - Pull and manage languages for your Storyblok space
- 📁 **File Organization** - Organized file structure with the `.storyblok` directory as default
- 🛠️ **Customizable Paths** - Flexible path configuration for all generated files
- 📝 **Naming Conventions** - Consistent file naming with customizable suffixes and prefixes
- 📂 **Separate Files Support** - Option to work with individual component files or consolidated files
- 👀 **Dry Run Mode** - Preview migrations changes before applying them to your Storyblok space
- 🔍 **Filtering Capabilities** - Filter components and stories using glob patterns and Storyblok query syntax
- 📊 **Verbose Logging** - Improved error handling and detailed logging options for debugging and monitoring## Pre-requisites
- [Node.js >= 18.0.0](https://nodejs.org/en/download/)
- Storyblok account (sign up [here](https://app.storyblok.com/#!/signup?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-cli))
- Personal access token from Storyblok (get it [here](https://app.storyblok.com/#/me/account?tab=token))## Documentation
> [!WARNING]
> Official documentation for this package v4 is still in development. In the meantime, please refer to the internal documentation for the [v4 beta](src/README.md).## Setup
This package relies on [pnpm](https://pnpm.io/) to manage dependencies. For instructions on how to install pnpm, please visit [pnpm.io](https://pnpm.io/installation).
```bash
pnpm install
```## Build
```bash
pnpm build
```### Testing
To run the tests you can use the following command:
```bash
pnpm run test
```If you prefer a more visual experience while writing tests you can use this command powered by [vitest/ui](https://vitest.dev/guide/ui):
```bash
pnpm run test:ui
```You can also check the coverage with:
```bash
pnpm run coverage
```### Debugging
To debug the CLI you can use the `launch.json` configuration in the `.vscode` folder. You can run any command with the debugger attached.

Then you can set breakpoints directly to the typescript files and the debugger will handle the rest with sourcempaps.

## Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
- [Discuss Storyblok on Github Discussions](https://github.com/storyblok/storyblok/discussions)
For community support, chatting with other users, please visit:
- [Discuss Storyblok on Discord](https://storyblok.com/join-discord)
## Support
For bugs or feature requests, please [submit an issue](https://github.com/storyblok/storyblok-cli/issues/new/choose).
> [!IMPORTANT]
> Please search existing issues before submitting a new one. Issues without a minimal reproducible example will be closed. [Why reproductions are Required](https://antfu.me/posts/why-reproductions-are-required).### I can't share my company project code
We understand that you might not be able to share your company's project code. Please provide a minimal reproducible example that demonstrates the issue by using tools like [Stackblitz](https://stackblitz.com) or a link to a Github Repo lease make sure you include a README file with the instructions to build and run the project, important not to include any access token, password or personal information of any kind.
### I only have a question
If you have a question, please ask in the [Discuss Storyblok on Discord](https://storyblok.com/join-discord) channel.
## Contributing
If you're interested in contributing to Storyblok CLI, please read our [contributing docs](https://github.com/storyblok/.github/blob/main/contributing.md) before submitting a pull request.
## License
[License](/LICENSE)