KageDocs
Plugin SDK

Plugin SDK

Create themes, fonts, routing setups, sandboxed pages, and desktop backends.

Kage client documentation

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
ThemesSettings → Appearance → Theme, under "From plugins"
FontsThe font list in Settings → Appearance
Routing setupsRouting → From plugins
A pageUnder the plugin, in Settings → Plugins
A background pageNowhere: 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.vflow

Copy it, change the id in plugin.json to your own, and build it:

go run ./cmd/nuggetplugin path/to/your-plugin

This 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

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.

Native backend reference

On this page