2022-11-21 09:31:05AM

This commit is contained in:
Alexander Wang 2022-11-21 09:31:05 -08:00
parent fdae2a1089
commit 72b8a48ba4
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
2 changed files with 9 additions and 32 deletions

View file

@ -22,8 +22,6 @@
- [Quickstart](#quickstart)
- [Install](#install)
* [Install script](#install-script)
* [Install from source](#install-from-source)
- [D2 as a library](#d2-as-a-library)
- [Themes](#themes)
- [Fonts](#fonts)
@ -60,46 +58,16 @@ A browser window will open with `out.svg` and live-reload on changes to `in.d2`.
For detailed installation docs with examples see [./docs/INSTALL.md](./docs/INSTALL.md).
### 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.
```sh
# With --dry-run the install script will print the commands it will use
# to install without actually installing so you know what it's going to do.
curl -fsSL https://d2lang.com/install.sh | sh -s -- --dry-run
# If things look good, install for real.
curl -fsSL https://d2lang.com/install.sh | sh -s --
```
We have precompiled binaries on the [releases](https://github.com/terrastruct/d2/releases)
page for macOS and Linux. For both amd64 and arm64. We will release package manager
distributions like .rpm, .deb soon. D2 is on Homebrew with our tap (the install script
uses this automatically if it detects you have `brew`). See
[./docs/INSTALL.md](./docs/INSTALL.md).
Docker image coming soon.
To uninstall:
```sh
curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall --dry-run
# If things look good, uninstall for real.
curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall
```
> warn: Our binary releases aren't fully portable like normal Go binaries due to the C
> dependency on v8go for executing dagre.
### Install from source
Alternatively, you can install from source:
```sh
go install oss.terrastruct.com/d2/cmd/d2@latest
```
## D2 as a library
In addition to being a runnable CLI tool, D2 can also be used to produce diagrams from

View file

@ -69,6 +69,8 @@ The install script places the standalone release into `$PREFIX/lib/d2/d2-<versio
and we recommend doing the same with manually installed releases so that you
know where the release directory is for easy uninstall.
> warn: Our binary releases aren't fully portable like normal Go binaries due to the C
> dependency on v8go for executing dagre.
## From source
@ -77,3 +79,10 @@ Alternatively, you can always install from source:
```sh
go install oss.terrastruct.com/d2/cmd/d2@latest
```
## Coming soon
- Docker image
- Windows install
- rpm and deb packages
- homebrew core