Skip to main content

Install

tip

There are more detailed install instructions for Mac, Windows, and Linux, using a variety of methods, here. This page is an abridged version.

Install script​

The recommended way to install is to run our install script, which will figure out the best way to install based on your machine. E.g. if D2 is available through a package manager installed, it will use that package manager.

Follow the instructions, if any. Test your installation was successful by running d2 version.

If you want to uninstall:

Install from source​

Alternatively, you can install from source:

info

You can also download precompiled binaries specific to your OS on the Github releases page: https://github.com/d2lang/d2/releases.

Try it out

It should have spun up a local web browser that will automatically refresh when you change input.d2. Modify input.d2 as you go through this tour to follow along.