Skip to main content
Use the label field to override the task name printed in the output. This is especially useful when using variables to distinguish between multiple calls to the same task.
Taskfile.yaml
version: '3'
tasks:
  display:
    internal: true
    label: 'display-{{.MESSAGE}}'
    cmds:
      - echo "{{.MESSAGE}}"
  test:
    cmds:
      - task: display
        vars:
          MESSAGE: hello
      - task: display
        vars:
          MESSAGE: world
Demo and Output
ubuntu@touted-mite:~$ task test
task: [display-hello] echo "hello"
hello
task: [display-world] echo "world"
world
The label field supports Go template syntax, so you can include any variable in the displayed task name.

Build docs developers (and LLMs) love