Your first plugin
Open Settings → Plugins, choose Create Plugin, and open its code editor.
Configuration:
{
"ver": 1,
"name": "Hello Thymer",
"icon": "puzzle",
"description": "A first command palette plugin"
}
Custom Code:
class Plugin extends AppPlugin {
onLoad() {
this.ui.addCommandPaletteCommand({
label: "Say hello",
icon: "ti-hand-wave",
onSelected: () => {
this.ui.addToaster({
title: "Hello from your plugin",
message: "Your command is working.",
dismissible: true,
autoDestroyTime: 3000
});
}
});
}
}
Click Preview, press ⌘PCtrl+P, and run Say hello. A notification appears. Save, and the command is there for everyone in the workspace.
Make it do something
this.data.searchByQuery("@task @overdue", 50) returns matching records and lines; this.ui.getActivePanel() tells you which page the user is looking at. From here the shape of most plugins is the same: a command, a bit of data access, and a toaster or a panel to show the result. The Plugin API reference lists what is available, and the SDK examples show working plugins to copy from.
Icons are Tabler icon names, ti- followed by the icon.