|
| 1 | +--- |
| 2 | +title: Environment Reference |
| 3 | +description: A reference for the Taskfile environment variables |
| 4 | +outline: deep |
| 5 | +--- |
| 6 | + |
| 7 | +# Environment Reference |
| 8 | + |
| 9 | +Task allows you to configure some behavior using environment variables. This |
| 10 | +page lists all the environment variables that Task supports. |
| 11 | + |
| 12 | +| ENV | Default | Description | |
| 13 | +| ----------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 14 | +| `TASK_TEMP_DIR` | `.task` | Location of the temp dir. Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. | |
| 15 | +| `TASK_REMOTE_DIR` | `TASK_TEMP_DIR` | Location of the remote temp dir (used for caching). Can relative to the project like `tmp/task` or absolute like `/tmp/.task` or `~/.task`. | |
| 16 | +| `TASK_OFFLINE` | `false` | Set the `--offline` flag through the environment variable. Only for remote experiment. CLI flag `--offline` takes precedence over the env variable | |
| 17 | +| `FORCE_COLOR` | | Force color output usage. | |
| 18 | + |
| 19 | +## Custom Colors |
| 20 | + |
| 21 | +| ENV | Default | Description | |
| 22 | +| --------------------------- | ------- | ----------------------- | |
| 23 | +| `TASK_COLOR_RESET` | `0` | Color used for white. | |
| 24 | +| `TASK_COLOR_RED` | `31` | Color used for red. | |
| 25 | +| `TASK_COLOR_GREEN` | `32` | Color used for green. | |
| 26 | +| `TASK_COLOR_YELLOW` | `33` | Color used for yellow. | |
| 27 | +| `TASK_COLOR_BLUE` | `34` | Color used for blue. | |
| 28 | +| `TASK_COLOR_MAGENTA` | `35` | Color used for magenta. | |
| 29 | +| `TASK_COLOR_CYAN` | `36` | Color used for cyan. | |
| 30 | +| `TASK_COLOR_BRIGHT_RED` | `91` | Color used for red. | |
| 31 | +| `TASK_COLOR_BRIGHT_GREEN` | `92` | Color used for green. | |
| 32 | +| `TASK_COLOR_BRIGHT_YELLOW` | `93` | Color used for yellow. | |
| 33 | +| `TASK_COLOR_BRIGHT_BLUE` | `94` | Color used for blue. | |
| 34 | +| `TASK_COLOR_BRIGHT_MAGENTA` | `95` | Color used for magenta. | |
| 35 | +| `TASK_COLOR_BRIGHT_CYAN` | `96` | Color used for cyan. | |
| 36 | + |
| 37 | +All color variables are [ANSI color codes][ansi]. You can specify multiple codes |
| 38 | +separated by a semicolon. For example: `31;1` will make the text bold and red. |
| 39 | +Task also supports 8-bit color (256 colors). You can specify these colors by |
| 40 | +using the sequence `38;2;R:G:B` for foreground colors and `48;2;R:G:B` for |
| 41 | +background colors where `R`, `G` and `B` should be replaced with values between |
| 42 | +0 and 255. |
| 43 | + |
| 44 | +For convenience, we allow foreground colors to be specified using shorthand, |
| 45 | +comma-separated syntax: `R,G,B`. For example, `255,0,0` is equivalent to |
| 46 | +`38;2;255:0:0`. |
| 47 | + |
| 48 | +[ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code |
0 commit comments