Building from source
To build the Structurizr CLI from source, you’ll need git
and Java 17+ installed. The Structurizr UI is required for the CLI to export a static site, so you will need to additionally clone the structurizr/ui repo.
Build
git clone https://github.com/structurizr/java.git structurizr-java
git clone https://github.com/structurizr/cli.git structurizr-cli
git clone https://github.com/structurizr/ui.git structurizr-ui
cd structurizr-java
./gradlew -Pversion=dev clean build publishToMavenLocal
cd ..
cd structurizr-cli
./ui.sh
./gradlew -PstructurizrVersion=dev clean build getDeps buildZip
Run
If successful, you can then use a command like the following to run the Structurizr CLI:
java -cp "build/libs/*:build/dependencies/*" com.structurizr.cli.StructurizrCliApplication
Alternatively:
- Unzip
build/distributions/structurizr-cli.zip
into a directory of your choice. - Add the directory to your operating system’s path (optional).
- Use the
structurizr.sh
orstructurizr.bat
file as appropriate for your operating system.
Docker
To build a Docker image:
docker build . -t mytag