npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onestic/spaces-manager

v1.3.5

Published

Storyblok Spaces manager by API

Readme

Spaces Manager CLI

The "Spaces Manager" module is a command-line tool designed to streamline and automate the management of content within Storyblok (CMS). This module offers a comprehensive suite of commands enabling developers and content managers to efficiently perform critical tasks such as backing up, restoring, synchronizing, and managing various data types within Storyblok spaces.

Features

  • Backup and Restore: Backup stories, components, and assets; restore them as needed.
  • Content Synchronization: Sync local changes with Storyblok, keeping environments aligned.
  • Component Management: Download, compare, and sync component definitions.
  • Datasource Handling: Manage datasources with download, diff, and sync capabilities.
  • Role Management: Download and sync roles for effective access control.
  • Asset Management: Download assets for backup and version control.
  • Space Management: Create new spaces and manage API keys easily.

Table of Contents

⚙️ Configuration

Create an .env file in the root folder of your project with the following information:

STORYBLOK_BACKUPS_FOLDER="backups"
STORYBLOK_PERSONAL_TOKEN="Y0URT0K3N"
STORYBLOK_MASTER_SPACE_NAME="SPACE_NAME"

You can find a .env.sample file at the root of the project.

💻 Commands

You can run the following commands from the root folder of your project using your preferred package manager, such as npm, npx, or yarn.

| Command | Description | |--------------------------------------|-------------------------------------------------------------------------------------------------------| | storyblok-components-download | Downloads the components from a Storyblok space to enable local backups and version control. | | storyblok-components-diff | Compares local component definitions with those in Storyblok to identify differences. | | storyblok-components-sync | Synchronizes local component changes to Storyblok, updating the remote components to match locally. | | storyblok-stories-backup-save | Saves a backup of stories from Storyblok to a local directory for safekeeping. | | storyblok-stories-backup-restore | Restores stories from a local backup to the Storyblok space, overwriting the remote versions. | | storyblok-stories-sync | Synchronizes local story changes to Storyblok, updating the remote stories to match locally. | | storyblok-stories-set-content-type | Changes the content-type of the desired story. | | storyblok-datasources-download | Downloads the datasource entries from Storyblok for local backup and version control. | | storyblok-datasources-diff | Compares local datasource definitions with those in Storyblok to identify differences. | | storyblok-datasources-sync | Synchronizes local datasource changes to Storyblok, updating the remote datasources to match locally. | | storyblok-roles-download | Downloads the roles from Storyblok to enable local backups and version control. | | storyblok-roles-sync | Synchronizes local role changes to Storyblok, updating the remote roles to match locally. | | storyblok-create | Creates a new space in Storyblok based on local definitions and templates. | | storyblok-getapikey | Retrieves the API key for a specified Storyblok space for authentication purposes. | | storyblok-presets-sync | Synchronizes local preset changes to Storyblok, updating the remote presets to match locally. | | storyblok-presets-download | Downloads the presets from Storyblok for local backup and version control. | | storyblok-assets-download | Downloads assets from Storyblok for local backup and to enable version control of media files. |

📖 Folder and Files Organization

📁 config: Contains all the commands and options that commands can receive.

📁 src/commands: Contains executable scripts designed for various tasks in a Storyblok development environment. These scripts handle operations like asset management, component comparison, and story synchronization, providing efficient tools for content and configuration management.

📁 src/utils:

  • 🗄️ commander.js: Initializes command line interface and handles command options. (src/utils/commander.js)
  • 🗄️ fileManager.js: Reads and creates folders. (src/utils/fileManager.js)
  • 🗄️ helpers.js: Provides various helper functions like deleting stories, obtaining spaces, etc. (src/utils/helpers.js)
  • 🗄️ sbClient.js: Handles API requests to Storyblok. (src/utils/sbClient.js)