warning
Documentation is currently for moon v2 and latest proto. Documentation for moon v1 has been frozen and can be found here.
query tasks
Use the moon query tasks sub-command to query task information for all projects in the project
graph. The tasks list can be filtered by passing a query statement as
an argument, or by using options arguments.
# Find all tasks grouped by project
$ moon query tasks
# Find all tasks from projects with an id that matches "react"
$ moon query tasks --id react
$ moon query tasks "task~react"
This will output a list of projects as JSON. The output has the following structure:
{
tasks: Record<string, Record<string, Task>>,
options: QueryOptions,
}
Arguments
[query]- An optional query statement to filter projects with. When provided, all filter options are ignored. v1.4.0
Options
Affected
--affected- Filter tasks that have been affected by touched files.--downstream- Include downstream dependents of queried tasks. Supports "none" (default), "direct", "deep". v1.30.0--upstream- Include upstream dependencies of queried tasks. Supports "none", "direct", "deep" (default). v1.30.0
Filtersv1.30.0
All option values are case-insensitive regex patterns.
--command <regex>- Filter tasks that match this command.--id <regex>- Filter tasks that match this ID.--project <regex>- Filter tasks that belong to this project.--script <regex>- Filter tasks that match this script.--toolchain <regex>- Filter tasks of this toolchain. v1.31.0--type <regex>- Filter tasks of this type.