Configuration 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
- Configuration files
- Command-line flags
In this document, we will look at the second of the three options, configuration files.
File Precedence
Task will automatically look for directories containing configuration files in the following order with the highest priority first:
- Current directory (or the one specified by the
--taskfile/--entrypointflags). - Each directory walking up the file tree from the current directory (or the one specified by the
--taskfile/--entrypointflags) until we reach the user's home directory or the root directory of that drive. - The users
$HOMEdirectory. - The
$XDG_CONFIG_HOME/taskdirectory.
Config files in the current directory, its parent folders or home directory should be called .taskrc.yml or .taskrc.yaml. Config files in the $XDG_CONFIG_HOME/task directory are named the same way, but should not contain the . prefix.
All config files will be merged together into a unified config, starting with the lowest priority file in $XDG_CONFIG_HOME/task with each subsequent file overwriting the previous one if values are set.
For example, given the following files:
# lowest priority global config
option_1: foo
option_2: foo
option_3: foooption_1: bar
option_2: bar# highest priority project config
option_1: bazYou would end up with the following configuration:
option_1: baz # Taken from $HOME/path/to/project/.taskrc.yml
option_2: bar # Taken from $HOME/.taskrc.yml
option_3: foo # Taken from $XDG_CONFIG_HOME/task/.taskrc.ymlConfiguration Options
experiments
The experiments section allows you to enable Task's experimental features. These options are not enumerated here. Instead, please refer to our experiments documentation for more information.
experiments:
feature_name: 1
another_feature: 2verbose
- Type:
boolean - Default:
false - Description: Enable verbose output for all tasks
- CLI equivalent:
-v, --verbose
verbose: trueconcurrency
- Type:
integer - Minimum:
1 - Description: Number of concurrent tasks to run
- CLI equivalent:
-C, --concurrency
concurrency: 4Example Configuration
Here's a complete example of a .taskrc.yml file with all available options:
# Global settings
verbose: true
concurrency: 2
# Enable experimental features
experiments:
REMOTE_TASKFILES: 1