Skip to content
GrapesJS CLI helper for the development
JavaScript HTML
Branch: master
Clone or download
Latest commit b2c0b00 Nov 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Rename in GrapesJS CLI Oct 21, 2019
src Compile locale files on build Nov 6, 2019
.gitignore Update gitignore Oct 23, 2019
LICENSE Update README Sep 16, 2019 Update README header Oct 24, 2019
index.html Update gitignore Oct 23, 2019
package-lock.json Bump v1.0.11 Nov 6, 2019
package.json Bump v1.0.11 Nov 6, 2019

GrapesJS CLI

npm Dependency Status


A simple CLI library for helping in GrapesJS plugin development.

The goal of this package is to avoid the hassle of setting up all the dependencies and configurations for the plugin development by centralizing and speeding up the necessary steps during the process.

  • Fast project scaffolding
  • No need to touch Babel and Webpack configurations

Plugin from 0 to 100

Create a production-ready plugin in a few simple steps.

  • Create a folder for your plugin and init some preliminary steps
mkdir grapesjs-my-plugin
cd grapesjs-my-plugin
npm init -y
git init
  • Install the package
npm i -D grapesjs-cli
  • Init your plugin project by following few steps
npx grapesjs-cli init

You can also skip all the questions with -y option or pass all the answers via options (to see all available options run npx grapesjs-cli init --help)

npx grapesjs-cli init -y --user=YOUR-GITHUB-USERNAME
  • The command will scaffold the src directory and a bunch of other files inside your project. The src/index.js will be the entry point of your plugin. Before starting developing your plugin run the development server and open the printed URL (eg. the default is http://localhost:8080)
npx grapesjs-cli serve

If you need a custom port use the -p option

npx grapesjs-cli serve -p 8081

Under the hood we use webpack-dev-server and you can pass its option via CLI in this way

npx grapesjs-cli serve --devServer='{"https": true}'
  • Once the development is finished you can build your plugin and generate the minified file ready for production
grapesjs-cli build
  • Before publishing your package remember to complete your file with all the available options, components, blocks and so on. For a better user engagement create a simple live demo by using services like JSFiddle CodeSandbox CodePen and link it in your README. To help you in this process we'll print all the necessary HTML/CSS/JS in your README, so it will be just a matter of copy-pasting on some of those services.

Generic CLI usage

Show all available commands


Show available options for a command

grapesjs-cli COMMAND --help

Run the command

grapesjs-cli COMMAND --OPT1 --OPT2=VALUE



You can’t perform that action at this time.