downloadTemplate

'copilot-swe-agent[bot',title='copilot-swe-agent[bot]'] Ralf D. Müller Johannes Thorn Pascal Euhus

2 minutes to read

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

You can choose to bootstrap your project as an Antora project or as a plain AsciiDoc project. The Antora integration is currently in beta. The Antora integration enables you to register the project seamlessly with an existing Antora playbook.

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)

  • Antora setup: n (no Antora)

export DTC_HEADLESS=true
./dtcw downloadTemplate

Using Project Properties

You can override specific options using Gradle project properties:

  • -PdtcTemplate=<template> - Template name (e.g., arc42, req42)

  • -PdtcLang=<language> - Language code (e.g., EN, DE, FR)

  • -PdtcHelp=<variant> - Help variant: plain or withhelp

  • -PdtcAntora=<boolean> - Antora setup: y, yes, true, or n, no, false

./dtcw downloadTemplate -PdtcTemplate=req42 -PdtcLang=DE -PdtcHelp=withhelp -PdtcAntora=n

These properties work in both interactive and headless mode, allowing you to automate template downloads with specific configurations.

experimental Antora support

  • to test the Antora template

    • install antora: https://docs.antora.org/antora/latest/install/install-antora/

    • download the arc42 template as antora style ./dtcw downloadTemplate

    • create a playbook.yaml within the root of your project

    • make sure that your project is a valid git repository and contains at least one commit

    • execute antora playbook.yml

playbook.yml
site:
  title: Antora ARC42 Template
  start_page: arc42-template::index.adoc
content:
  sources:
  - url: ./
    start_path: src/docs/arc42
    branches: [HEAD]
ui:
  bundle:
    url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
    snapshot: true
asciidoc:
  attributes:
    sectanchors: true

output:
  dir: build/antora
Note
To install antora, follow the instructions on https://docs.antora.org/antora/latest/install-and-run-quickstart/

Further Reading and Resources