Usage of CLI
The SabaccUI CLI is a command-line tool that allows you to create and manage SabaccUI projects.
Login
This command will prompt you to enter your SabaccUI account credentials. Once you have successfully logged in, you can start using the CLI to manage your projects and bloks.
sabaccui login
This command will prompt you to enter your SabaccUI account credentials. Once you have successfully logged in, you can start using the CLI to manage your projects.
Logout
This command will log you out of your account and revoke your access to the CLI.
sabaccui logout
This command will log you out of your account and revoke your access to the CLI.
Buy
Purchase a SabaccUI license key:
sabaccui buy
license
Enter and activate your SabaccUI license key:
sabaccui license
Configure
Retrieve your global SabaccUI settings:
sabaccui config
Retrieve a specific SabaccUI setting:
sabaccui config <key>
Set a SabaccUI setting:
sabaccui config <key> <value>
Available Settings
Key | Default | Description |
---|---|---|
certificateSources.cert | null | Path to a SSL certificate file to be linked into the project. |
certificateSources.key | null | Path to a SSL key file to be linked into the project. |
List Templates
This command will display a list of all available project templates that you can use to create a new project.
sabaccui templates
This command will display a list of all available project templates that you can use to create a new project.
Create a New Project
To create a new SabaccUI project, run the following command:
sabaccui init my-project [template]
This command will create a new project directory named my-project
and set up the necessary files and folders for a SabaccUI project. You can optionally specify a template to use for the project creation.
Arguments
my-project
: The name of the project directory to create.[template]
: Optional. The template to use for the project creation. If not specified, the default boilerplate template will be used.-p, --path
: Optional. The path where the project will be created. If not specified, the project will be created in the current directory.
Setup
Setup SabaacUI in an existing project:
sabaccui setup
List Bloks
To list all available bloks that you can add to your project, run the following command:
sabaccui bloks
This command will display a list of all available bloks that you can add to your project.
Add a Blok
To add bloks to your project, run the following command:
sabaccui add <blok-name>
This command will copy the specified blok into your project directory, setting it up within your linked storyblok space, allowing you to use it in your application.
Arguments
blok-name
: The name of the blok to add to your project.-p, --path
: Optional. The path where the blok will be added. If not specified, the blok will be added to the current directory.