diff --git a/README.md b/README.md index 4dc18eb71..14fa751fa 100644 --- a/README.md +++ b/README.md @@ -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) @@ -58,47 +56,20 @@ A browser window will open with `out.svg` and live-reload on changes to `in.d2`. ## Install -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. +The easiest way to install is with our install script: ```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 -``` +For detailed installation docs, with alternative methods and examples for each OS, see +[./docs/INSTALL.md](./docs/INSTALL.md). ## D2 as a library diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 0dda53b17..cf6599adb 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -13,6 +13,9 @@ This file documents all the ways by which you can install D2. ## install.sh +The recommended and easiest way to install is with our install script, which will detect +the OS and architecture you're on and use the best method: + ```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. @@ -69,6 +72,8 @@ The install script places the standalone release into `$PREFIX/lib/d2/d2- 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 +82,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