Command Line Reference

run from the command line:

1. Requirements:

  • Java
  • The latest version of PlantUML downloaded

Run:

:program:`java -jar planutml.jar`

Note: “plantuml.jar” must either be in your PATH or you need to specify the exact path (full location with folders/directories)

%dirpath% Path of the current file

%filename% Name of the current file

Helpful command line options

Help:

See all of the command line options available by running

java -jar plantuml.jar -help

Search path:

You can specify the java property plantuml.include.path in the command line.

For example:

java -Dplantuml.include.path="c:/mydir" -jar plantuml.jar atest1.txt

:note:`The this -D option has to put before the -jar option. -D options after the -jar option will be used to define constants within plantuml preprocessor.`

  • See all of the regular expression patterns that PlantUML uses as it parses instructions:

    java -jar plantuml.jar -pattern
    
  • language items and skinparams

Running:

java -jar plantuml.jar -language

Will show you all keywords, skinparameter keywords, and color names.

Command Line Options

Todo

In the midst of reorganizing these into helpful groups

-I<path to a file to include>

This is the same as using the !include directive to include a file

-metadata

Extracts the PlantUML source from a .png file.

-help
-gui

run the graphical user interface

Set the Generated Image Type

-tpng

generate images using PNG format (default)

-tsvg

generate images using SVG format

-teps

generate images using EPS format

-tpdf

generate images using PDF format

-tvdx

generate images using VDX format

-txmi

generate XMI file for class diagram

-tscxml

generate SCXML file for state diagram

-thtml

generate HTML file for class diagram

-ttxt

generate images with ASCII art

-tutxt

generate images with ASCII art using Unicode characters

-tlatex

generate images using LaTeX/Tikz format

-tlatex:nopreamble

generate images using LaTeX/Tikz format without preamble

-preproc

output preprocessor text of diagrams

File Locations (input and output)

-o[utput] “dir”

generate images in the specified directory

-r[ecurse]

recurse through directories

-I<file>

include file as if ‘!include file’ were used

-I<file pattern>

include files with pattern

-e[xclude] <pattern>

exclude files that match the provided pattern

-checkmetadata

Skip PNG files that don’t need to be regenerated

-overwrite

allow to overwrite read only files

-p[ipe]

use stdin for PlantUML source and stdout for PNG/SVG/EPS generation

Additional Information In Files

Misc

-D<VAR1=value>

set a preprocessing variable as if ‘!define VAR1 value’ were used

-S<param1=value>

set a skin parameter as if ‘skinparam param1 value’ were used

-charset <xxx>

use a specific charset (default is UTF-8)

-metadata

retrieve PlantUML sources from PNG images

-nometadata

NOT export metadata in PNG/SVG generated files

-v[erbose]

have log information

-quiet

NOT print error message into the console

-debugsvek

generate intermediate svek files

-encodesprite 4|8|16[z] “file”

encode a sprite at gray level (z for compression) from an image

-computeurl | -encodeurl

compute the encoded URL of a PlantUML source file

-decodeurl

retrieve the PlantUML source from an encoded URL

-pipeimageindex <N>

generate the Nth image with pipe option

-extractstdlib

extract PlantUML Standard Library into stdlib folder

-filename <a filename>

“example.puml” To override %filename% variable

PlantUML Configuration or Syntax

Todo

move options about syntax into a different grouping

-testdot

test the installation of graphviz

-graphvizdot <executable file>

specify dot executable

-checkversion

check if a newer version is available for download

-syntax

report any syntax error from standard input without generating images

-checkonly

check the syntax of files without generating images

-failfast

stop processing as soon as a syntax error in diagram occurs

-failfast2

do a first syntax check before processing files, to fail even faster

Statistics and Performance

-duration

print the duration of complete diagrams processing

-nbthread <N>

use (N) threads for processing

-nbthread auto

use 8 threads for processing

-timeout <N>

Processing timeout in (N) seconds. Defaults to 15 minutes (900 seconds).

-enablestats

enable statistics computation

-disablestats

disable statistics computation (default)

-htmlstats

output general statistics in file plantuml-stats.html

-xmlstats

output general statistics in file plantuml-stats.xml

-realtimestats

generate statistics on the fly rather than at the end

-loopstats

continuously print statistics about usage

-splash

display a splash screen with some progress bar

-progress

display a textual progress bar in console