Kunkun
Concepts

Extension Types

Compare Kunkun's plugin runtimes and choose the right one.

Kunkun supports several plugin architectures with different capabilities and isolation levels. Each command in your manifest picks exactly one mode.

Quick comparison

TypeRuntimeUINode.js accessUse case
Custom-ViewBrowserWindowFull controlNoComplex SPAs, dashboards, existing web apps
Worker-ViewWeb WorkerReact → host rendersNoRaycast-style extensions, max isolation
Node-ViewNode.js / Deno processReact → host rendersYesUI + filesystem/shell/native
Worker-HeadlessWeb WorkernoneNoBackground commands (browser sandbox)
Node-HeadlessNode.js / Deno processnoneYesBackground commands with system access
ServiceNode.js / Deno processnoneYesAPIs for other extensions and the AI agent

UI plugins

Custom-View

A static SPA loaded into an isolated BrowserWindow via kunkun-ext://. You control the entire UI with any framework.

{ "name": "main", "mode": "custom-view", "main": "/", "dist": "dist", "devMain": "http://localhost:5173" }

Best when you need full UI control, are converting an existing web app, or want framework-specific features. → Guide

Worker-View

React components run in a Web Worker; the host renders your component tree as native UI (see How Extensions Run). Consistent styling, strong sandbox, fast startup, no Node.js.

{ "name": "main", "mode": "worker-view", "main": "dist/App.js" }

Best for Raycast-style list/form extensions. → Guide

Node-View

Same UI model as worker-view, but running in a Node.js/Deno process — so you get filesystem, shell, and native module access.

{ "name": "main", "mode": "node-view", "main": "dist/node/App.js", "runtime": "auto" }

Headless commands

No UI — run logic, optionally show a toast, exit. → Guide

{ "name": "sync", "mode": "node-headless", "main": "dist/node/Sync.js" }

Headless commands can also be scheduled (interval, cron) or event-triggered.

Service plugins

Declare a services[] array and your extension exposes callable, schema-validated methods that other extensions — and the built-in AI agent — can invoke through the service broker. → Guide

Runtime selection (Node modes)

For node-view / node-headless / services, Kunkun picks the runtime automatically:

PriorityRuntimeWhy
1DenoBest sandbox — per-domain --allow-net, scoped --allow-read/write
2Node.js v20+Node permission model
3utilityProcessFallback, no sandbox

Force one with "runtime": "deno" (or "node"). See Permissions → process sandbox.

Deno is preferred for a reason

Deno restricts network access per-domain at the process level (--allow-net=api.example.com), whereas Node's model is coarser. If your extension does network I/O, Deno gives users a tighter guarantee.

Choosing

You need…Use
Full UI control / an existing web appCustom-View
Raycast-style UI, no system accessWorker-View
UI and filesystem/shell/nativeNode-View
Background work, browser sandboxWorker-Headless
Background work with system accessNode-Headless
APIs for other extensions / AIService

On this page