www/apps/resources/app/medusa-cli/commands/plugin/page.mdx
import { Table } from "docs-ui"
export const metadata = {
title: plugin Commands - Medusa CLI Reference,
}
Commands in the Medusa CLI starting with plugin: perform actions related to plugin development.
These commands are available starting from Medusa v2.3.0.
</Note>Publish a plugin into the local packages registry. The command uses Yalc under the hood to publish the plugin to a local package registry. You can then install the plugin in a local Medusa project using the plugin:add command.
npx medusa plugin:publish
Install the specified plugins from the local package registry into a local Medusa application. Plugins can be added to the local package registry using the plugin:publish command.
npx medusa plugin:add [names...]
`names`
</Table.Cell>
<Table.Cell>
The names of one or more plugins to install from the local package registry. A plugin's name is as specified in its `package.json` file.
</Table.Cell>
<Table.Cell>
Yes
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>Start a development server for a plugin. The command will watch for changes in the plugin's source code and automatically re-publish the changes into the local package registry.
npx medusa plugin:develop
Generate migrations for all modules in a plugin.
npx medusa plugin:db:generate
Build a plugin before publishing it to NPM. The command will compile the output in the .medusa/server directory.
npx medusa plugin:build