# Plugins development
Strapi allows the development of local plugins that work exactly like the external plugins available from the Marketplace (opens new window).
🤓 Extending plugins
If you would rather extend an existing plugin than create a new one, see the Plugins extension documentation.
# Create a plugin
Strapi provides a command line interface (CLI) for creating plugins. To create a plugin:
- Navigate to the root of a Strapi project.
- Run
yarn strapi generate
ornpm run strapi generate
in a terminal window to start the interactive CLI. - Choose "plugin" from the list, press Enter, and give the plugin a name in kebab-case (e.g. my-plugin-name)
- Choose either
JavaScript
orTypeScript
for the plugin language. - Enable the plugin by adding it to the plugins configurations file:
- (TypeScript-specific) Run
npm install
oryarn install
in the newly-created plugin directory. - Run
yarn build
ornpm run build
to build the plugin.
Plugins created using the preceding directions are located in the plugins
directory of the application (see project structure).
# Add features to a plugin
Strapi provides programmatic APIs for plugins 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).