@bpmnkit/cli-sdk
v0.0.2
Published
Plugin authoring SDK for the casen CLI
Downloads
192
Maintainers
Readme
Website · Documentation · GitHub · Changelog
Overview
@bpmnkit/cli-sdk is the official SDK for building casen CLI plugins. It exports the CasenPlugin contract and all supporting types (CommandGroup, Command, RunContext, OutputWriter) so you can build typed, TUI-integrated plugins without depending on casen internals.
Installation
Install as a devDependency in your plugin package:
pnpm add -D @bpmnkit/cli-sdk
npm install --save-dev @bpmnkit/cli-sdkQuick Start
import type { CasenPlugin } from "@bpmnkit/cli-sdk"
const plugin: CasenPlugin = {
id: "com.example.casen-hello",
name: "Hello",
version: "0.1.0",
groups: [
{
name: "hello",
description: "Say hello",
commands: [
{
name: "world",
description: "Print a greeting",
async run(ctx) {
ctx.output.ok("Hello, world!")
},
},
],
},
],
}
export default pluginAPI Reference
CasenPlugin
The top-level contract every plugin must export as its default export.
interface CasenPlugin {
/** Unique reverse-domain identifier, e.g. "com.acme.casen-deploy" */
id: string
/** Human-readable name shown in `casen plugin list` */
name: string
version: string
/** Command groups this plugin contributes to the CLI */
groups: CommandGroup[]
}CommandGroup
Maps to a single top-level token: casen <group>.
interface CommandGroup {
name: string // kebab-case, e.g. "my-integration"
aliases?: string[]
description: string
commands: Command[]
}Command
interface Command {
name: string
aliases?: string[]
description: string
args?: ArgSpec[]
flags?: FlagSpec[]
examples?: Example[]
run(ctx: RunContext): Promise<void>
}RunContext
Passed to every run() function.
interface RunContext {
positional: string[]
flags: ParsedFlags
output: OutputWriter
/** Returns a Camunda C8 REST client. Cast to `CamundaClient` from `@bpmnkit/api`. */
getClient(): Promise<unknown>
getAdminClient(): Promise<unknown>
}OutputWriter
interface OutputWriter {
readonly format: "table" | "json" | "yaml"
readonly isInteractive: boolean
printList(data: unknown, columns: ColumnDef[]): void
printItem(data: unknown): void
print(data: unknown): void
ok(msg: string): void // ✓ message
info(msg: string): void // → message
}Related Packages
| Package | Description |
|---------|-------------|
| @bpmnkit/core | BPMN/DMN/Form parser, builder, layout engine |
| @bpmnkit/canvas | Zero-dependency SVG BPMN viewer |
| @bpmnkit/editor | Full-featured interactive BPMN editor |
| @bpmnkit/engine | Lightweight BPMN process execution engine |
| @bpmnkit/feel | FEEL expression language parser & evaluator |
| @bpmnkit/plugins | 22 composable canvas plugins |
| @bpmnkit/api | Camunda 8 REST API TypeScript client |
| @bpmnkit/ascii | Render BPMN diagrams as Unicode ASCII art |
| @bpmnkit/ui | Shared design tokens and UI components |
| @bpmnkit/profiles | Shared auth, profile storage, and client factories for CLI & proxy |
| @bpmnkit/operate | Monitoring & operations frontend for Camunda clusters |
| @bpmnkit/connector-gen | Generate connector templates from OpenAPI specs |
| @bpmnkit/cli | Camunda 8 command-line interface (casen) |
| @bpmnkit/proxy | Local AI bridge and Camunda API proxy server |
| @bpmnkit/create-casen-plugin | Scaffold a new casen CLI plugin in seconds |
| @bpmnkit/casen-report | HTML reports from Camunda 8 incident and SLA data |
