Plugin SDK
Create themes, fonts, routing setups, sandboxed pages, and desktop backends.
Mobile support
Android supports themes, fonts, and routing setups from plugins. Plugin pages are disabled on Android. Native backends require Windows, macOS, or Linux.
A plugin is a single .nuggetplugin file: a zip with a plugin.json at its
root. It can bring:
| Where it shows up | |
|---|---|
| Themes | Settings → Appearance → Theme, under "From plugins" |
| Fonts | The font list in Settings → Appearance |
| Routing setups | Routing → From plugins |
| A page | Under the plugin, in Settings → Plugins |
| A background page | Nowhere: it runs, unseen, while the plugin is on |
A plugin with only themes, fonts and routing setups runs no code at all. Pages are plain HTML and JavaScript. They run in a sandbox and reach the app through a small message API, and only for what the user allowed when installing.
Quick start
The quickest start is the example in
examples/plugins/glance. It has a status
card with a connect button, a theme, and a routing setup that blocks common
trackers:
glance/
├── plugin.json
├── icon.svg
├── panel.html
└── routing/
└── trackers.vflowCopy it, change the id in plugin.json to your own, and build it:
go run ./cmd/nuggetplugin path/to/your-pluginThis writes your-plugin.nuggetplugin next to the folder. It checks the
plugin the way the app does on install, so any mistake shows up here first.
Then install it under Settings → Plugins → Install a plugin….
A minimal plugin that only adds a theme:
{
"format": 1,
"id": "com.example.dusk",
"name": "Dusk",
"version": "1.0.0",
"themes": [
{
"id": "dusk",
"name": "Dusk",
"mode": "dark",
"background": { "h": 280, "c": 0.03, "l": 0.16 },
"accent": { "h": 30, "c": 0.15 }
}
]
}Where to go next
- plugin.json reference: every field.
- Themes, fonts and routing setups: content plugins.
- Writing pages: the SDK, styling, sizing, storage.
- API reference: every method and event.
- Permissions and the sandbox: what a plugin can and can't do, and why.
- Packaging and publishing: building, versions and updates.
Native and hybrid plugins
On Windows, macOS, and Linux, a plugin may package an executable backend. A hybrid plugin adds a sandboxed page alongside that backend. Kage checks the package contents against the user-approved checksum and asks for approval if the files change. Native executables have the current user’s OS permissions.