Description
Task supports --dry to preview the order of task execution without actually running them, and --list --json to output task metadata as JSON. However, combining --dry with --json is not supported.
Problem: When integrating Task into CI/CD pipelines or external tooling, it is sometimes useful to programmatically preview which tasks would run and in what order before actually executing them. The current --dry output is human-readable text, which requires parsing and is fragile to format changes.
Example use cases:
- A CI system that wants to validate the task execution plan before triggering actual builds
- An IDE plugin that shows a preview of what
task deploy would do
- Dry-run validation in automated deployment scripts
Proposed behavior:
$ task --dry --json
{
"tasks": [
{"task": "build", "dir": "/project"},
{"task": "test", "dir": "/project"},
{"task": "deploy", "dir": "/project"}
]
}
The output should include at minimum: task name, working directory, and the resolved command/dependencies for each task that would execute.
Alternative considered: Using --list --json gives task metadata but not the execution order or which tasks would actually run for a given command invocation.
Description
Task supports
--dryto preview the order of task execution without actually running them, and--list --jsonto output task metadata as JSON. However, combining--drywith--jsonis not supported.Problem: When integrating Task into CI/CD pipelines or external tooling, it is sometimes useful to programmatically preview which tasks would run and in what order before actually executing them. The current
--dryoutput is human-readable text, which requires parsing and is fragile to format changes.Example use cases:
task deploywould doProposed behavior:
$ task --dry --json { "tasks": [ {"task": "build", "dir": "/project"}, {"task": "test", "dir": "/project"}, {"task": "deploy", "dir": "/project"} ] }The output should include at minimum: task name, working directory, and the resolved command/dependencies for each task that would execute.
Alternative considered: Using
--list --jsongives task metadata but not the execution order or which tasks would actually run for a given command invocation.