# Plugins development
Strapi allows you to create local plugins that work exactly like the external ones installed with npm or through the Marketplace.
🤓 Extending plugins
If you would rather extend an existing plugin than create a new one, see the Plugins extension documentation.
# Creating a plugin
To create a plugin, use Strapi CLI tools:
- (Optional) If you don't already have an existing project, create a new development project with
strapi new myDevelopmentProject
. - Start the project with
cd myDevelopmentProject && strapi develop
. - In a new terminal window, run
cd /path/to/myDevelopmentProject && strapi generate
to launch the interactivestrapi generate
CLI. - Choose "plugin" from the list, press Enter, and give the plugin a name.
- Enable the plugin by adding it to the plugins configurations file:
// path: /path/to/myDevelopmentProject/config/plugins.js module.exports = { // ... 'my-plugin': { enabled: true, resolve: './src/plugins/my-plugin' // path to plugin folder }, // ... }
- Run
strapi build
to build the plugin.
Plugins created this way are located in the plugins
folder of the application (see project structure).
# Adding features to a plugin
Strapi provides programmatic APIs for your plugin to hook into some of Strapi's features.
Plugins can register with the server and/or the admin panel, by looking for entry point files at the root of the package:
strapi-server.js
for the Server (see Server API),strapi-admin.js
for the admin panel (see Admin Panel API).