GitHubGitHub Stars
01

Install

Every bundle ships a self-contained Java 21 runtime (jlink) — no external JDK required.

Homebrew · macOS / Linux · recommended
# Homebrew (macOS · Linux) — recommended
brew install kuml-dev/kuml/kuml
Chocolatey · Windows
# Chocolatey (Windows) — self-contained, no JDK required
choco install kuml
Scoop · Windows
# Scoop (Windows, CLI only) — self-contained, no JDK required
scoop bucket add kuml https://github.com/kuml-dev/scoop-kuml
scoop install kuml
Manual · everything else
# Manual download — self-contained jlink runtime,
# no JDK required, works on macOS / Linux / Windows.
# Pick the latest release for your OS/arch:
#   https://github.com/kuml-dev/kUML/releases
curl -L -o kuml.zip \
  https://github.com/kuml-dev/kUML/releases/download/v0.56.0/kuml-runtime-0.56.0-darwin-arm64.zip
unzip kuml.zip && export PATH="$PWD/kuml-0.56.0/bin:$PATH"
kuml --version

Prefer a graphical app? kUML Desktop bundles editor, live preview and export in one window. It brings its own runtime — no JDK and no CLI install required.

kUML Desktop · macOS · Homebrew Cask
# kUML Desktop — macOS (signed and notarised .dmg)
brew install --cask kuml-dev/kuml/kuml-desktop
kUML Desktop · macOS / Windows / Linux · installer
# kUML Desktop — manual download (all files on the release page)
#   https://github.com/kuml-dev/kUML/releases/latest
# macOS:   kuml-desktop-<version>.dmg  (open it, drag the app to Applications)
# Windows: kuml-desktop-<version>.msi  (double-click; the MSI is not code-signed,
#          Windows SmartScreen may show a warning)
# Linux:   kuml-desktop-<version>-x86_64.AppImage
#          chmod +x kuml-desktop-<version>-x86_64.AppImage && ./kuml-desktop-<version>-x86_64.AppImage
#          (needs FUSE 2; without it: ./kuml-desktop-<version>-x86_64.AppImage --appimage-extract-and-run)

On Linux there are signed repositories for DEB (Debian, Ubuntu) andRPM (Fedora), each for the kuml CLI and thekuml-desktop app. The installation is tested with Ubuntu 22.04 and 24.04, Debian 12 and Fedora; RHEL-compatible distributions are untested. At the moment only 64-bit x86 packages are published.

Linux · Debian / Ubuntu · apt
# Debian / Ubuntu (amd64) — signed APT repository
curl -fsSL https://apt.kuml.dev/kuml.gpg | sudo tee /usr/share/keyrings/kuml.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/kuml.gpg] https://apt.kuml.dev stable main" \
  | sudo tee /etc/apt/sources.list.d/kuml.list
sudo apt update
sudo apt install kuml            # command-line tool
sudo apt install kuml-desktop    # desktop app
# Up to and including 0.56.0 the CLI is installed to /opt/kuml/bin/kuml.
# A single file instead of the repository: sudo apt install ./<file>.deb
Linux · Fedora · dnf
# Fedora (x86_64) — signed RPM repository
sudo curl -fsSL -o /etc/yum.repos.d/kuml.repo https://rpm.kuml.dev/kuml.repo
sudo dnf install kuml            # command-line tool
sudo dnf install kuml-desktop    # desktop app
# The CLI package does not create a /usr/bin/kuml link; call /opt/kuml/bin/kuml.
# A single file instead of the repository: sudo dnf install ./<file>.rpm
02

Write your first model

Create a file with the extension .kuml.kts — a Kotlin script with a built-in KumlScriptDefinition. No imports required.

Order.kuml.kts
// Order.kuml.kts — no imports needed,
// the kUML scripting host provides them.
classDiagram(name = "Order Class Diagram") {
    val status = enumOf(name = "OrderStatus") {
        literal(name = "DRAFT")
        literal(name = "CONFIRMED")
        literal(name = "SHIPPED")
    }

    val customer = classOf(name = "Customer") {
        attribute(name = "email", type = "String")
    }

    val order = classOf(name = "Order") {
        attribute(name = "id", type = "UUID")
        attribute(name = "status", type = status)
        operation(name = "submit")
    }

    association(source = customer, target = order) {
        source { multiplicity(spec = "1") }
        target { multiplicity(spec = "1..*"); role = "orders" }
    }
}
03

Render, watch, validate, embed

One CLI for every step of the loop — render once, watch on save, validate with OCL, embed inside Markdown.

# Render a .kuml.kts file to SVG (default) or PNG
kuml render Order.kuml.kts -o Order.svg

# Iterate with live-reload (500 ms polling, never crashes on script errors)
kuml watch Order.kuml.kts -o Order.svg

# Run OCL constraints — also validates applied stereotypes
kuml validate Order.kuml.kts --check-stereotypes --output text

# Generate Java POJOs, JPA entities or SQL DDL from the model
kuml generate Order.kuml.kts --format java --out gen/
kuml generate Order.kuml.kts --format sql  --out gen/schema.sql

# List, inspect and validate built-in or custom profiles
kuml profile list                                # SoaML · JavaEE · Spring · OpenAPI · AUTOSAR

# Simulate a state machine headless — emits a deterministic JSON trace
kuml simulate OrderLifecycle.kuml.kts --events events.json --epoch-clock

# Export a C4 model back to Structurizr DSL (round-trip safe)
kuml export Architecture.kuml.kts --format structurizr -o workspace.dsl

# Embed kuml-fenced blocks inside Markdown or AsciiDoc / Antora
kuml markdown --input architecture.md   --output architecture.out.md   --mode inline
kuml asciidoc --input architecture.adoc --output architecture.out.adoc --mode inline
04

Embed as a library

All kUML modules are published to Maven Central since0.2.0 — the current release is 0.56.0. Drop the artifacts into any JVM project and call the DSL directly. A dedicated Gradle plugin (dev.kuml) is published on the Gradle Plugin Portalsince v0.32.0 — apply it with id("dev.kuml") version "0.56.0" in your plugins block for the kumlRender, kumlGenerate and kumlValidate tasks.

build.gradle.kts
// build.gradle.kts — embed kUML as a library
// (all kuml-* artifacts are on Maven Central since 0.2.0, currently at 0.56.0)
dependencies {
    implementation("dev.kuml:kuml-core-script:0.56.0")        // DSL + script host
    implementation("dev.kuml:kuml-core-config:0.56.0")        // kuml.config.kts DSL
    implementation("dev.kuml:kuml-layout-elk:0.56.0")
    implementation("dev.kuml:kuml-io-svg:0.56.0")
    // optional:
    implementation("dev.kuml:kuml-io-png:0.56.0")             // SVG → PNG via Batik
    implementation("dev.kuml:kuml-core-ocl:0.56.0")           // OCL constraints
    implementation("dev.kuml:kuml-gen-kotlin:0.56.0")         // Kotlin codegen
    implementation("dev.kuml:kuml-gen-java:0.56.0")           // Java + JPA codegen
    implementation("dev.kuml:kuml-gen-sql:0.56.0")            // SQL DDL codegen
    implementation("dev.kuml:kuml-runtime-core:0.56.0")       // headless state-machine simulator
    implementation("dev.kuml:kuml-asciidoc:0.56.0")           // AsciiDoc / Antora preprocessor
    // built-in profiles (ServiceLoader-discoverable):
    implementation("dev.kuml:kuml-profile-soaml:0.56.0")
    implementation("dev.kuml:kuml-profile-javaee:0.56.0")
    implementation("dev.kuml:kuml-profile-spring:0.56.0")
    implementation("dev.kuml:kuml-profile-openapi:0.56.0")
    implementation("dev.kuml:kuml-profile-autosar:0.56.0")

    // Gradle plugin (kumlRender / kumlGenerate / kumlValidate tasks) — apply via the
    // plugins {} block instead, see https://plugins.gradle.org/plugin/dev.kuml
}
Going further

What's next?