downloadTemplate

About This Task

This task is primarily used to bootstrap a new project. You can choose to download an official template like arc42 or req42 (both available in multiple languages) or you can register and use your own custom template.

Setup and Configuration

Important
downloadTemplate requires an existing docToolchainConfig.groovy in your project root (or the path set via DTC_CONFIG_FILE). If the file doesn’t exist yet, create an empty one: touch docToolchainConfig.groovy.

Headless Mode

For unattended use (e.g., with CI/CD pipelines or LLM agents), the downloadTemplate task supports headless mode where no user input is required.

Using the DTC_HEADLESS Environment Variable

When DTC_HEADLESS=true is set, the task will use sensible defaults:

  • Template: arc42

  • Language: EN

  • Help variant: plain (without help text)

export DTC_HEADLESS=true
./dtcw4 local downloadTemplate

Further Reading and Resources

Source

View the source of this task: scripts/downloadTemplate.groovy on GitHub