Skip to main content

Plugin CLI reference

Caution

The Plugin CLI is currently experimental.

The Plugin CLI is set of commands orientated around developing plugins to use them as local plugins or to publish them on NPM and/or submit them to the Marketplace.

The present documentation lists the available Plugin CLI commands. The associated guide illustrates how to use these commands to create a plugin from scratch, link it to an existing project, and publish it.

strapi plugin:init

Create a new plugin at a given path.

strapi plugin:init <path>
ArgumentsTypeDescriptionDefault
pathstringPath to the plugin./src/plugins/my-plugin
OptionTypeDescriptionDefault
-d, --debug-Enable debugging mode with verbose logsfalse
--silent-Do not log anythingfalse

strapi plugin:build

Bundle the strapi plugin for publishing.

strapi plugin:build
OptionTypeDescriptionDefault
--forcestringAutomatically answer "yes" to all prompts, including potentially destructive requests, and run non-interactively.-
-d, --debug-Enable debugging mode with verbose logsfalse
--silent-Do not log anythingfalse
--minify-Minify the outputtrue
--sourcemaps-Produce sourcemapsfalse

Recompiles the plugin automatically on changes and runs yalc push --publish.

strapi plugin:link-watch
OptionTypeDescriptionDefault
-d, --debug-Enable debugging mode with verbose logsfalse
--silent-Do not log anythingfalse

strapi plugin:watch

Watch and compile the Strapi plugin for local development.

strapi plugin:watch
OptionTypeDescriptionDefault
-d, --debug-Enable debugging mode with verbose logsfalse
--silent-Do not log anythingfalse

strapi plugin:verify

Verify the output of the plugin before publishing it.

strapi plugin:verify
OptionTypeDescriptionDefault
-d, --debug-Enable debugging mode with verbose logsfalse
--silent-Do not log anythingfalse