Storyblok Raises $80M Series C - Read News

Skip to main content

How to use storyblok-create-demo CLI

  • FAQ
  • How to use storyblok-create-demo CLI

storyblok-create-demo CLI

Section titled What is storyblok-create-demo?

This is a CLI command to quickly start a project with your favourite framework, already setup with Storyblok. 


To use the storyblok-create-demo CLI command, you need to:

  1. Signup at https://app.storyblok.com/
  2. Create a new space and retrieve the space preview token under Space -> Settings -> Access Tokens
  3. Execute following command with the space preview access token:
            
          npx @storyblok/create-demo@latest
     
    cd my-app
    npm i && npm run dev
        
  4. Open the Storyblok editor and directly edit your content locally: http://localhost:3000/editor.html
HINT:

The URL varies between different frameworks, you will be provided with the specific URL in your terminal if everything is done correctly.

Section titled CLI options

The CLI has different options that can be filled, you can see all the options by running npx @storyblok/create-demo --help. To see in detail the function of each option, you can read that here.

If you want to skip the “questions” in the CLI and fill it with your options directly in one line, you can do this: 


        
      npx @storyblok/create-demo@latest --key YOUR_STORYBLOK_PREVIEW_TOKEN --region us-east-1