--- url: /docs/deprecations/template.md description: Template for documenting deprecated features in Task --- # {Name of Deprecated Feature} (#{Issue}) ::: danger This deprecation breaks the following functionality: * {list any existing functionality that will be broken by this deprecation} * {if there are no breaking changes, remove this admonition} ::: {Short description of the feature/behavior and why it is being deprecated} {Short explanation of any replacement features/behaviors and how users should migrate to it} --- --- url: /docs/experiments/template.md --- # {Name of Experiment} (#{Issue}) ::: warning All experimental features are subject to breaking changes and/or removal *at any time*. We strongly recommend that you do not use these features in a production environment. They are intended for testing and feedback only. ::: ::: warning This experiment breaks the following functionality: * {list any existing functionality that will be broken by this experiment} * {if there are no breaking changes, remove this admonition} ::: :::info To enable this experiment, set the environment variable: `TASK_X_{feature}=1`. Check out [our guide to enabling experiments ][enabling-experiments] for more information. ::: {Short description of the feature} {Short explanation of how users should migrate to the new behavior} [enabling-experiments]: /docs/experiments/#enabling-experiments --- --- url: /docs/reference/cli.md description: 'Complete reference for Task CLI commands, flags, and exit codes' --- # Command Line Interface Reference Task has multiple ways of being configured. These methods are parsed, in sequence, in the following order with the highest priority last: * [Environment variables](./environment.md) * [Configuration files](./config.md) * *Command-line flags* In this document, we will look at the last of the three options, command-line flags. All CLI commands override their configuration file and environment variable equivalents. ## Format Task commands have the following syntax: ```bash task [options] [tasks...] [-- CLI_ARGS...] ``` ::: tip If `--` is given, all remaining arguments will be assigned to a special `CLI_ARGS` variable. ::: ## Commands ### `task [tasks...]` Run one or more tasks defined in your Taskfile. ```bash task build task test lint task deploy --force ``` ### `task --list` List all available tasks with their descriptions. ```bash task --list task -l ``` ### `task --list-all` List all tasks, including those without descriptions. ```bash task --list-all task -a ``` ### `task --init` Create a new Taskfile.yml in the current directory. ```bash task --init task -i ``` ::: tip Combine `--list` or `--list-all` with `--silent` (`-ls` or `-as` for shortants) to list only the task names in each line. Useful for scripting with `grep` or similar. ::: ## Options ### General #### `-h, --help` Show help information. ```bash task --help ``` #### `--version` Show Task version. ```bash task --version ``` #### `-v, --verbose` Enable verbose mode for detailed output. ```bash task build --verbose ``` #### `-s, --silent` Disable command echoing. ```bash task deploy --silent ``` #### `--disable-fuzzy` Disable fuzzy matching for task names. When enabled, Task will not suggest similar task names when you mistype a task name. ```bash task buidl --disable-fuzzy # Output: Task "buidl" does not exist # (without "Did you mean 'build'?" suggestion) ``` ### Execution Control #### `-F, --failfast` Stop executing dependencies as soon as one of them fails. ```bash task build --failfast ``` #### `-f, --force` Force execution even when the task is up-to-date. ```bash task build --force ``` #### `-n, --dry` Compile and print tasks without executing them. ```bash task deploy --dry ``` #### `-p, --parallel` Execute multiple tasks in parallel. ```bash task test lint --parallel ``` #### `-C, --concurrency ` Limit the number of concurrent tasks. Zero means unlimited. ```bash task test --concurrency 4 ``` #### `-x, --exit-code` Pass through the exit code of failed commands. ```bash task test --exit-code ``` ### File and Directory #### `-d, --dir ` Set the directory where Task will run and look for Taskfiles. ```bash task build --dir ./backend ``` #### `-t, --taskfile ` Specify a custom Taskfile path. ```bash task build --taskfile ./custom/Taskfile.yml ``` #### `-g, --global` Run the global Taskfile from `$HOME/Taskfile.{yml,yaml}`. ```bash task backup --global ``` ### Output Control #### `-o, --output ` Set output style. Available modes: `interleaved`, `group`, `prefixed`. ```bash task test --output group ``` #### `--output-group-begin