d2
Verified for current stable LTS
D2 Commands
D2 command syntax with verified terminal examples.
Commands
6 commands for D2
d2 Operations
D2 Command: Compile Render D2 File
d2 <path/to/input_file.d2> <path/to/output_file.ext> d2 Operations
D2 Command: Format D2 Source File
d2 fmt <path/to/input_file.d2> d2 Operations
D2 Command: List Available D2 Themes
d2 themes d2 Operations
D2 Command: Render D2 Diagram As Sketch
d2 -s true <path/to/input_file.d2> <path/to/output_file.ext> d2 Operations
D2 Command: Use Different Theme D2 Output
d2 -t <theme_id> <path/to/input_file.d2> <path/to/output_file.ext> d2 Operations
D2 Command: Watch Live D2 Source
d2 -w <path/to/input_file.d2> <path/to/output_file.ext> Suggest a D2 Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common D2 workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.