Task: List Tasks with task --list
task --list prints every task that has a desc field, with its description.
Task uses an explicit desc field for documentation. --list shows documented tasks; --list-all shows everything, including internal helpers.
What it does
task --list (or -l) prints the name and desc of each task that has a desc set, which is how you publish a public task interface. task --list-all (or -a) also lists tasks without a desc. task --summary <name> prints the long summary field for a single task. Tasks marked internal: true are hidden from both lists.
Common usage
# Taskfile.yml
version: '3'
tasks:
build:
desc: Compile the binaries
cmds: [go build ./...]
_gen:
internal: true
cmds: [go generate ./...]
# show documented tasks
# task --list
# show everything including undocumented
# task --list-allSyntax
| Flag / key | What it does |
|---|---|
| --list, -l | List tasks that have a desc |
| --list-all, -a | List all tasks, documented or not |
| --summary <task> | Print the long summary for one task |
| desc: <text> | One-line description shown by --list |
| internal: true | Hide the task from listings and direct calls |
In CI
Run task --list in a debug job to record the documented task surface of the checked-out Taskfile. Mark setup-only helpers with internal: true so they stay out of the public list and cannot be called directly by mistake.
Common errors in CI
"task: No Taskfile found" means no Taskfile.yml in the tree; fix the working directory or pass --taskfile. If --list shows nothing, no task has a desc field; add descriptions or use --list-all. Calling an internal task directly fails with "task: Task _gen is internal".