Getting started
Plugma is a powerful command-line interface designed to streamline your development workflow. It makes it easier to create, build, and manage your plugins.
Prerequisites
Before you start, ensure you have Node.js and the Figma desktop app installed. These tools are essential for developing plugins.
Start from a template
To create a plugin from a template, run the following command in your terminal and follow the prompts.
npm create plugma@latest
Install and import
Change to the plugin directory and install the dependencies.
cd my-plugin
npm install
Run the following to watch for changes while developing.
npm run dev
Import the plugin
After you've run the dev
, build
or preview
command, a dist
directory will be created where you can import the plugin from the manifest.json
file.
- Open a file in Figma.
- Search for "Import plugin from manifest..." using the Actions menu (
Cmd + /
). - Choose the
manifest.json
file from thedist
folder.
Open the Figma desktop app, go to the Actions menu, search for your plugin, and select it. Your code changes will update instantly in the UI.
Before publishing
Before publishing your plugin, make sure to create a build. If not, it will still point to the dev server and won't work properly for users.
npm run build