Publishing
Build a self-contained extension, publish to npm or jsr, and install from the store.
Kunkun extensions are ordinary packages. Publishing is: build a self-contained artifact, npm publish (or jsr publish), and users install it from the built-in store.
1. Build a self-contained artifact
The golden rule
Kunkun installs your published tarball as-is — it never runs npm install inside it. Everything your commands and services need at runtime must be in the build output.
- Bundle your JS dependencies into each command/service output (Bun's bundler does this by default — avoid
externalentries unless the host provides the dep). - Native
.nodeaddons can't be inlined. Copy the addon loader + platform files intodist/and allow them via thebackendpermission'scapabilities.addons, or lazy-load the native feature so the extension degrades gracefully. - Keep
filesinpackage.jsonlimited to what ships (e.g.["dist"]).
Verify locally by loading the built folder via Settings → Developer → Load Extension before publishing.
2. Manifest essentials for the store
The store reads these from your kunkun manifest:
{
"kunkun": {
"identifier": "com.you.my-extension",
"name": "My Extension",
"icon": { "type": "iconify", "value": "mdi:puzzle", "invert": true },
"shortDescription": "One-line pitch shown in the store",
"longDescription": "Longer description.",
"demoImages": ["https://…/screenshot.png"],
"categories": ["Developer Tools"],
"permissions": ["clipboard-read"],
"commands": [ /* … */ ]
}
}Validate the whole package.json against the schema with the interactive validator before you publish.
3. Publish
pnpm build
npm publish --access publicpnpm build
npx jsr publish4. Install & dependencies
Users install by identifier from the store. On install, Kunkun:
- Downloads the tarball and extracts it,
- Validates the manifest,
- Registers the extension (and any
services[]it declares).
If your extension consumes another extension's service, declare it in serviceDependencies. The store previews required services and warns before uninstalling something other extensions depend on.
Versioning tips
- Bump
versionon every publish; users get updates through the store. - Treat your
identifieras permanent — it's how installs, storage, and grants are keyed. - Changing a service's method signatures is a breaking change for consumers — version the contract.