-
Notifications
You must be signed in to change notification settings - Fork 0
Publishing a Plugin
krwg edited this page Jul 8, 2026
·
1 revision
Step-by-step guide to add or update a plugin in cultiva-plugins.
- Cultiva 1.7.0+ installed for testing
- Fork of cultiva-plugins
- Read Cultiva PLUGIN_AUTHOR_GUIDE
my-plugin/
manifest.json
index.js
styles.css # optional
data.json # optional — list in manifest.data
manifest.json minimum:
{
"id": "my-plugin",
"name": "My Plugin",
"version": "1.0.0",
"description": "Short description",
"icon": "",
"entry": "index.js",
"styles": ["styles.css"],
"permissions": ["ui"],
"minAppVersion": "1.7.0"
}export default class MyPlugin {
constructor(context, hooks) {
this.context = context;
this.hooks = hooks;
}
async onEnable() {
this.context.ui.updateMainHeader({ label: 'Hello', icon: '' });
}
async onDisable() {
// cleanup timers, listeners
}
}Use main-window UI APIs — sandbox cannot access real DOM.
Point Cultiva registry URL to your fork's raw registry.json:
https://raw.githubusercontent.com/YOUR_USER/cultiva-plugins/main/registry.json
Install via Settings → Plugins. Check DevTools for sandbox errors.
node scripts/compute-registry-sha256.mjsVerify registry.json updated with correct hashes.
Append to plugins array in registry.json with all required fields (see Registry Spec).
Include:
- Plugin source files
- Updated
registry.json - Screenshot or short description of behavior
- Confirmation tested on Cultiva 1.7.0
- Bump
versionin bothmanifest.jsonand registry entry. - Re-run sha256 script.
- PR with changelog note in description.
Users reinstall or wait for future auto-update support.
If your plugin uses openMainSheet:
- Include full sheet scaffold (overlay + card) or wait for core shared CSS
- Use
data-cultiva-action/data-cultiva-input-actfor interactions - Implement
onModalAction(action, payload)on your class
Avoid rebuilding the entire sheet on every input keystroke — causes focus loss (core fix pending).
| Permission | Grants |
|---|---|
ui |
Header, sheets, garden, notifications |
storage |
context.storage.get/set |
network |
fetch in sandbox (HTTP GET) |
Declare only what you use. Audio() streaming is currently outside fetch permission gate.