@bpmnkit/ascii
v0.0.16
Published
Render BPMN diagrams as Unicode box-drawing ASCII art — perfect for terminals and docs
Maintainers
Readme
Website · Documentation · GitHub · Changelog
Overview
@bpmnkit/ascii converts BPMN 2.0 diagrams into Unicode box-drawing text art. It uses the same Sugiyama layout engine as the visual renderer, so the spatial flow of the diagram is preserved.
Useful for: CLI output, plain-text documentation, terminal UIs, test snapshots, and LLM prompts where visual BPMN isn't available.
Features
- Unicode box-drawing —
┌─┐,│,└─┘,→for clean terminal output - Automatic layout — uses
@bpmnkit/core's layout engine - All element types — tasks, events, gateways, sub-processes
- Configurable output — optional title, element type labels
- Zero additional dependencies — only requires
@bpmnkit/core(already bundled)
Installation
npm install @bpmnkit/asciiQuick Start
import { renderBpmnAscii } from "@bpmnkit/ascii"
import { readFileSync } from "node:fs"
const xml = readFileSync("my-process.bpmn", "utf8")
const art = renderBpmnAscii(xml, { title: true, showTypes: true })
console.log(art)Example output
Order Flow
══════════════════════════════════════════════
╭──────────╮ ╭───────────────╮ ╭╮
│ Order │────▶│ Validate Order│────▶││
│ Received │ │ (ServiceTask) │ │◇│
╰──────────╯ ╰───────────────╯ ╰╯
│
╭───────────────╯│╰───────────────╮
▼ ▼
╭───────────╮ ╭──────────────╮
│ Fulfill │ │ Reject │
│ Order │ │ Order │
╰───────────╯ ╰──────────────╯API Reference
function renderBpmnAscii(xml: string, options?: RenderOptions): string
interface RenderOptions {
title?: boolean // Show process name as header. Default: false
showTypes?: boolean // Include element type in boxes. Default: false
}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/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/cli-sdk | Plugin authoring SDK for the casen CLI |
| @bpmnkit/create-casen-plugin | Scaffold a new casen CLI plugin in seconds |
| @bpmnkit/casen-report | HTML reports from Camunda 8 incident and SLA data |
| @bpmnkit/casen-worker-http | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data |
| @bpmnkit/casen-worker-ai | AI task worker — classify, summarize, extract, and decide using Claude |
