Cheatsheet: PlantUML
Last updated 2026-09-24
Basics
Every diagram is wrapped in @startuml / @enduml
Add a title and a single-line comment
Sequence diagrams
Messages: -> solid, --> dashed (reply)
Declare participants and aliases
Activation / lifelines with activate & deactivate
Grouping: alt/else, loop, and opt frames
Notes (watch multi-line!)
Single-line note: text must stay on the same line after the colon
Multi-line note: use a note ... end note block. A colon note that wraps to a second line is a syntax error.
Note position: left, right, or over one participant
Class diagrams
Classes with fields and methods
Relationships: inheritance, composition, association
Use case diagrams
Actors, use cases, and include
Activity diagrams
Start/stop, actions, and conditionals (new syntax)
Component diagrams
Components, packages, and links
Rendering (CLI and local setup)
Render a .puml file to PNG or SVG with the jar
Render every .puml file in a directory recursively
Some diagram types (e.g. component diagrams) shell out to Graphviz's dot -- make sure it's on your PATH
Styling
skinparam tweaks the look; !theme applies a built-in theme