prismic-cli Technical Reference


A Node CLI for developing JavaScript apps with Prismic. Includes utilities for Slice Machine.

Dependencies and requirements

Runs on Node.js, and requires npm or yarn for installation.


Install globally via the command line:

  • npm
  • Yarn
npm i -g prismic-cli
yarn add -global prismic-cli

If you get a permissions error, you can try again with sudo:

  • npm
  • Yarn
sudo npm i -g prismic-cli
sudo yarn add -global prismic-cli


Basic commands


Display Prismic CLI help.

prismic new

Create a new Prismic repo.

prismic theme <theme-url>

Create a new Prismic repo, download project files (GIT repo or ZIP file) from a URL, clone project, and add new repo URL to project config.

prismic signup

Create a Prismic account.

prismic login

Log in to a Prismic account.

prismic logout

Log out of Prismic.

Basic options

--conf <conf-folder>

Used with theme. Specify the configuration file.


Used with theme. Ignore the configuration file.

Slice Machine commands

prismic sm

Display Prismic Slice Machine help.

prismic sm --ls

List all the slices from libraries and the local files.

prismic sm --setup

In the root folder of a supported framework (Nuxt.js and Next.js as of January, 2021), adds dependencies for Slice Machine and Slice Builder, creates a repo in Prismic, and adds Slice Machine configuration to project.

prismic sm --boostrap

Bootstrap a project with Slice Machine from an existing configuration.

prismic sm --create-slice

Create a new Slice component in your file system and a corresponding Slice in your Prismic repo.

prismic sm --add-storybook

Create a Storybook at the root of your project and configure it to display your local Slices.

prismic sm --develop

Launch the Slice Builder locally. Storybook must already be running.

prismic sm --pull

Pull slices from Prismic.

Slice Machine options


Used with --setup, skips the creation of a Prismic repo.


Used with --setup, specifies a local Slice directory.


Used with --create-slice or --add-storybook, specify the framework. Currently accepts next and nuxt.

# or

Used with --setup. Specify an external Slice library to include. Uses vue-essential-slices by default.


$ prismic new
# Create a project with a new prismic repository.

$ prismic theme
# Create a project from a zip file with a new prismic repository.

$ prismic sm --setup
# Setup a nuxt.js project with SliceMachine.

$ prismic sm --setup --lib vue-essential-slices --local-path ./slices
# Setup an existing Nuxt.js project with slicemachine.

$ prismic sm --ls
# List all the slices.

$ prismic sm --create-slice
# Setup a slice

$ prismic sm --pull
# Pull slices from Prismic

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.