Prismic CLI commands & options
The Prismic CLI is your gateway to work with Slice Machine. Using this tool allows you to set up your projects, manage your libraries, create new connected components and deploy new Slice models to your Prismic repo. So let's have a look at some of the commands you'll need to run to control that magic.
The CLI commands
You commands will follow this basic format
prismic sm <command> <options>
prismic sm --setup
will Bootstrap a project with Slicemachine from an existing configuration.
prismic sm --bootstrap
prismic sm --create-slice
lists all the slices from libraries and the local files.
prismic sm --ls
Add a Storybook
prismic sm --add-storybook
This command will check if you are logged in to Prismic through the CLI, if not you will be prompted to do so, this is necessary to push your Slices to Prismic. Then it will runto launch The Slice Builder. In the future we will allow you to log in through The Slice Builder window.
prismic sm --develop
skips the creation of a Prismic repository during the setup.
prismic sm --setup --no-prismic
Used to specify for which framework you want toor .
prismic sm --create-slice --framework nuxt
specifies a local folder that contains Slices during the setup.
prismic sm --setup --local-path ./slices
specifies which component library you want to use in your Nuxt Project.
prismic sm --setup --lib vue-essential-slices
Setup an existing Nuxt.js project with Slice Machine using the libraryand specify the local path .
prismic sm --setup --lib vue-essential-slices --local-path ./slices