d2
all
A modern diagram scripting language that turns text to diagrams. Note: The output file supports SVG and PNG file formats.
More info →Options (3)
-w, --watchbooleanWatch live changes made to a D2 source file in the default web browser
Example:
d2 {{[-w|--watch]}} {{path/to/input_file.d2}} {{path/to/output_file.ext}}-t, --themebooleanUse a different theme for the output file (list available themes first to get the desired `theme_id`)
Example:
d2 {{[-t|--theme]}} {{theme_id}} {{path/to/input_file.d2}} {{path/to/output_file.ext}}-s, --sketchbooleanMake rendered diagrams look like hand sketches
Example:
d2 {{[-s|--sketch]}} true {{path/to/input_file.d2}} {{path/to/output_file.ext}}Examples (6)
Compile and render a D2 source file into an output file
d2 path/to/input_file.d2 path/to/output_file.extWatch live changes made to a D2 source file in the default web browser
d2 [-w|--watch] path/to/input_file.d2 path/to/output_file.extList available themes
d2 themesUse a different theme for the output file (list available themes first to get the desired `theme_id`)
d2 [-t|--theme] theme_id path/to/input_file.d2 path/to/output_file.extmade by @shridhargupta | data from tldr-pages