cd <your project>
curl -Lo dtcw4 https://doctoolchain.org/dtcw4
chmod +x dtcw4
Install docToolchain
Prerequisites
-
Java 17, 21 or 25 — check with
java -version(./dtcw4 local install javainstalls Java 25 for you) -
git — needed to clone docToolchain during installation
-
Bash —
dtcw4is a Bash script (on Windows, use WSL2)
Quick Start
1. Get the Wrapper Script
Download dtcw4 into your project directory:
On Windows, use WSL2. dtcw4 is a Bash script.
|
2. Install docToolchain
# Install Java if needed
./dtcw4 local install java
# Install docToolchain v4
./dtcw4 local install doctoolchain
This clones the main-4.x branch and builds the runtime JARs once (~2 min).
After that, no build tool is involved at runtime.
3. Download a Template (optional)
First, create a config file if you don’t have one yet:
touch docToolchainConfig.groovy
./dtcw4 local downloadTemplate
This interactively installs the arc42 architecture template and updates your config file.
4. Generate Output
./dtcw4 local generateHTML
./dtcw4 local generatePDF
./dtcw4 local generateSite
Output is written to the build/ directory:
build/
├── html5/ # generateHTML output
├── pdf/ # generatePDF output
└── microsite/
└── output/ # generateSite output
5. List All Tasks
./dtcw4 tasks
How It Works
Only dtcw4 lives in your project directory. It handles:
-
Installation: Clones docToolchain from GitHub and builds the runtime JARs once.
-
Task execution: Delegates to the installed
dtcwin~/.doctoolchain/docToolchain-4.0.0/, which runs tasks directly via the JVM — no Gradle, no daemon.
Runtime JARs are stored in ~/.doctoolchain/docToolchain-4.0.0/lib/.
Task execution uses direct JVM invocation (~2-3s startup).
Running in Docker
docToolchain provides a container image from Docker Hub:
./dtcw4 docker generateHTML
The wrapper script detects the container engine and pulls the image automatically.
Custom Docker Image
./dtcw4 docker image <image_name> generateHTML
Environment Variables for Docker
Create a file dtcw_docker.env in your project directory:
PROJECT=MY_PROJECT
TEAM=MY_TEAM
Updating
./dtcw4 local install doctoolchain --update
This pulls the latest main-4.x and rebuilds the runtime JARs.
Environment Variables
| Variable | Default | Description |
|---|---|---|
|
|
docToolchain version to use |
|
|
Git branch to install from |
|
auto-detected |
Set to |
|
|
Path to configuration file |
|
(none) |
URL to an external microsite theme zip |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.