Packaging & Distribution

How to build, package, and distribute OpenGPEX plugins for installation by other users.


Build Tool

Use the built-in packaging script:

pnpm pack-plugin <PluginFolderName>

Example:

pnpm pack-plugin ColorPickerDrawer
# Output: dist/plugins/ColorPickerDrawer.zip

ZIP Structure

The packaged ZIP contains:

ColorPickerDrawer.zip
├── manifest.json       # Plugin metadata (generated from index.tsx)
├── index.mjs           # ESM bundle (compiled from TypeScript)
├── styles.css          # Extracted CSS (if any)
└── assets/             # Static assets (icons, images)
    └── icon.png

Manifest Requirements

The manifest.json must include:

{
  "id": "drawers.color_picker",
  "displayName": "Color Picker",
  "version": "1.0.0",
  "description": "A simple color picker tool",
  "author": "my-username",
  "category": "drawers",
  "engine": ">=1.0.0",
  "entrypoint": "index.mjs"
}

The engine field specifies the minimum OpenGPEX version required.


External Dependencies

Plugins cannot bundle external npm packages. They must rely on:

  • APIs provided by the editor (via hooks and context)
  • Built-in libraries exposed by the runtime (React, Lucide icons)
  • Self-contained code within the plugin bundle

Distribution Channels

Channel Method
GPEX Hub Upload ZIP via the Hub web interface (coming soon)
Direct share Send ZIP file; recipient installs via Settings > Plugins
Git repository Clone and place in plugins/user/ for local dev

Installation (User Side)

  1. Download the .zip file
  2. Open Editor → Settings → Plugins → Install
  3. Select the ZIP file
  4. Plugin appears in the appropriate slot immediately

Next Steps


Last updated: 2026-06-14