← Plugin docs

Getting Started

From zero to a working plugin in 5 minutes.

This guide walks through building a hello-world plugin: install Node, scaffold a project, edit one file, build it, drop it into your local Projelli plugins folder, and see it appear in the app.

Step 1: Install Node

You need Node.js 20 or later. Check what you have:

node --version

If you see v20.x.x or higher, you're good. If not, download the LTS installer from nodejs.org and run it. The installer adds node and npm to your PATH.

Step 2: Scaffold a project

Pick a folder where you keep code projects, then run:

npx create-projelli-plugin my-plugin

The CLI asks a couple of quick questions (display name, which permissions to declare), then creates a folder called my-plugin/ with a complete TypeScript project. It runs npm install for you.

Inside my-plugin/ you'll find:

FileWhat it is
manifest.jsonPlugin metadata: id, name, version, permissions.
src/index.tsYour plugin code. Exports a default { activate } object.
package.jsonnpm dependencies and scripts. Includes @projelli/plugin-api.
vite.config.tsBundles src/index.ts into a single ES module file at dist/index.js.
tsconfig.jsonStrict TypeScript settings.
README.mdNotes for whoever installs your plugin.
LICENSEMIT by default. Change if you want.

Step 3: Edit the plugin

Open src/index.ts in your editor. The starter looks like this:

import type { PluginAPI, PluginModule } from '@projelli/plugin-api';

const plugin: PluginModule = {
  async activate(api: PluginAPI) {
    api.commands.register('my-plugin.hello', () => {
      api.notify.info('Hello from my-plugin!');
    });

    api.toolbar.addButton({
      id: 'my-plugin-button',
      icon: 'sparkles',
      tooltip: 'Say hello',
      command: 'my-plugin.hello',
    });
  },
};

export default plugin;

That's a complete plugin. It registers one command and adds one toolbar button. Click the button and you get a notification.

Try changing the message to whatever you want.

Why TypeScript? The @projelli/plugin-api package is types-only. It gives you full autocomplete on api.editor, api.workspace, api.ai, and so on. You'll catch typos at build time instead of at runtime.

Step 4: Build

npm run build

Vite bundles your plugin into a single ES module file at dist/index.js. That's the file Projelli loads.

Step 5: Sideload

Copy manifest.json and the dist/ folder into Projelli's plugins directory:

OSPlugins folder
Windows%APPDATA%\Projelli\plugins\my-plugin\
macOS~/Library/Application Support/Projelli/plugins/my-plugin/
Linux~/.local/share/Projelli/plugins/my-plugin/

The folder name must match the id field in your manifest. After copying, the layout should look like:

plugins/my-plugin/
  manifest.json
  dist/
    index.js

Step 6: Enable in Projelli

Open Projelli, then go to Settings, then Plugins. Your plugin appears in the Installed list. Toggle it on. Projelli reads the manifest, asks you to approve any permissions, then loads the plugin.

Look at the toolbar. You should see a sparkles icon. Click it. You'll see your notification.

What's next

Next: Manifest reference →