d2/ci/release/template/man/d2.1

79 lines
1.6 KiB
Groff
Raw Normal View History

.Dd $Mdocdate$
.Dt d2 1
.Os
.Sh NAME
.Nm d2
.Nd compiles and renders d2 diagrams into svgs.
.Sh SYNOPSIS
.Nm d2
.Op Fl -watch Ar false
.Op Fl -theme Em 0
.Ar file.d2
2022-11-21 18:46:54 +00:00
.Op Ar file.svg
|
.Op Ar file.png
.Nm d2
.Op Fl -watch Ar false
.Op Fl -theme Em 0
.Ar file.d2
.Op Ar ...
.Nm d2
.Ar layout Op Ar name
.Sh DESCRIPTION
.Nm
compiles and renders
.Ar file.d2
2022-11-21 21:24:10 +00:00
to
2022-11-21 18:46:54 +00:00
.Ar file.svg
2022-11-21 19:02:17 +00:00
|
2022-11-21 18:46:54 +00:00
.Ar file.png
.Ns .
.Pp
Pass - to have
.Nm
read from stdin or write to stdout.
.Pp
See more docs, the source code and license at
.Lk https://oss.terrastruct.com/d2
.Sh OPTIONS
.Bl -tag -width Fl
.It Fl w , -watch Ar false
Watch for changes to input and live reload. Use
.Ev $PORT and Ev $HOST to specify the listening address.
2022-11-17 06:45:08 +00:00
.It Fl h , -host Ar localhost
Host listening address when used with
.Ar watch
.Ns .
.It Fl p , -port Ar 0
Port listening address when used with
.Ar watch
.Ns .
.It Fl t , -theme Ar 0
Set the diagram theme to the passed integer. For a list of available options, see
.Lk https://oss.terrastruct.com/d2
2022-11-17 06:45:08 +00:00
.Ns .
2022-11-17 01:13:38 +00:00
.It Fl l , -layout Ar dagre
Set the diagram layout engine to the passed string. For a list of available options, run
.Ar layout
2022-11-17 06:45:08 +00:00
.Ns .
.It Fl b , -bundle Ar true
Bundle all assets and layers into the output svg.
.It Fl d , -debug
Print debug logs.
.It Fl h , -help
Print usage information and exit.
.It Fl v , -version
Print version information and exit.
.El
.Sh SUBCOMMANDS
.Bl -tag -width Fl
.It Ar layout
Lists available layout engine options with short help.
.It Ar layout Op Ar name
Display long help for a particular layout engine.
.El
.Sh SEE ALSO
.Xr d2plugin-tala 1
.Sh AUTHORS
Terrastruct Inc.