Skip to main content

Environment Reference

Task allows you to configure some behavior using environment variables. This page lists all the environment variables that Task supports.

ENVDefaultDescription
TASK_TEMP_DIR.taskLocation of the temp dir. Can relative to the project like tmp/task or absolute like /tmp/.task or ~/.task.
TASK_REMOTE_DIRTASK_TEMP_DIRLocation of the remote temp dir (used for caching). Can relative to the project like tmp/task or absolute like /tmp/.task or ~/.task.
FORCE_COLORForce color output usage.

Custom Colors

ENVDefaultDescription
TASK_COLOR_RESET0Color used for white.
TASK_COLOR_RED31Color used for red.
TASK_COLOR_GREEN32Color used for green.
TASK_COLOR_YELLOW33Color used for yellow.
TASK_COLOR_BLUE34Color used for blue.
TASK_COLOR_MAGENTA35Color used for magenta.
TASK_COLOR_CYAN36Color used for cyan.
TASK_COLOR_BRIGHT_RED91Color used for red.
TASK_COLOR_BRIGHT_GREEN92Color used for green.
TASK_COLOR_BRIGHT_YELLOW93Color used for yellow.
TASK_COLOR_BRIGHT_BLUE94Color used for blue.
TASK_COLOR_BRIGHT_MAGENTA95Color used for magenta.
TASK_COLOR_BRIGHT_CYAN96Color used for cyan.

All color variables are ANSI color codes. You can specify multiple codes separated by a semicolon. For example: 31;1 will make the text bold and red. Task also supports 8-bit color (256 colors). You can specify these colors by using the sequence 38;2;R:G:B for foreground colors and 48;2;R:G:B for background colors where R, G and B should be replaced with values between 0 and 255.

For convenience, we allow foreground colors to be specified using shorthand, comma-separated syntax: R,G,B. For example, 255,0,0 is equivalent to 38;2;255:0:0.