Skip to content
Kepler
Esc
↑↓navigate↵open⌘Jpreview
On this page

Overview

The TypeScript SDK for building Kepler plugins.

@kepler-app/plugin-sdk is the TypeScript SDK for extending Kepler, a native macOS launcher.

The published SDK supports search modes, search providers, widgets, look-ahead items, settings, shortcuts, networking, and AppleScript. The development SDK also includes the process bridge, file search providers, and the keepOpen action option, which require Kepler 0.9.0.

Your plugin runs in JavaScriptCore. There’s no DOM, no Node, and no module system at runtime, only a bundled script that the app hands to the JavaScriptCore host. The host injects three globals: fetch, XMLHttpRequest, and console. You must supply everything else yourself.

To install the SDK, run the following command:

pnpm add @kepler-app/plugin-sdk

What a plugin can contribute

Plugin shape

A plugin is a single default-exported object:

import { definePlugin, Command, Icon, Action } from "@kepler-app/plugin-sdk";

export default definePlugin({
  metadata: {
    id: "com.example.hello",
    name: "Hello World",
    version: "1.0.0",
    author: "Your Name",
    icon: Icon.sfSymbol("hand.wave"),
  },
  searchModes: [
    Command.search({
      id: "greet",
      title: "Say Hello",
      shortcutPrefix: "h",
      run(query) {
        const name = query.raw || "World";
        return [{ id: "hello", title: `Hello, ${name}!`, action: Action.copy(name) }];
      },
    }),
  ],
});

A single CLI command turns that file into an installed plugin:

kepler-plugin bundle src/index.ts \
  --out "$HOME/Library/Application Support/Kepler/Plugins/hello.keplugin"

Where to go next

Example plugins

Was this page helpful?