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
Search modes
Your own /prefix surface. The user activates it, and your plugin owns the launcher.
Search providers
Results in global search, only when your match() says the query is relevant.
Widgets
An inline conversion, value, or message view, drawn under the search bar.
Look-ahead
Items in the upcoming strip Kepler shows before the user types.
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
Quickstart
Runtime limits
CLI reference
Example plugins
- Their Time: timezones for the people you work with
- GitHub Issues: search issues from the launcher