Environment variables
All environment variables are forwarded to programs being run by werk, unless
a recipe overrides this behavior by adding/removing environment variables.
For details around color terminal output settings, see Color terminal support.
Environment variables read by Werk
WERK_LOG: When set to a value, enables detailed logging. This takes a logging directive (RUST_LOGconventions). Overridden by the--logcommand-line option.NO_COLOR: Disable color output. Overridden by--color=always. Takes precedence over any other environment variables.CLICOLOR: When non-zero, enables color output. Overridden by--color=always/never,NO_COLOR, andCLICOLOR_FORCE.CLICOLOR_FORCE: When set, force-enable color output, same as--color=always. Overridden byNO_COLORand--color=never.
Environment variables set by Werk
CLICOLOR,CLICOLOR_FORCE,FORCE_COLOR: These are set for programs executed bywerkrecipes when color output is enabled (running in a terminal, or color is enabled through environment variables, or--color=alwaysis passed). Note that programs running through ashellexpression never have color enabled.NO_COLOR: This is set for programs executed bywerkwhen color output is disabled (not running in a terminal, or color is disabled through environment variables, or--color=neveris passed), and for all programs executed through ashellexpression
Modifying the environment in recipes
Recipes may add or remove environment variables for programs executed by that recipe. Environment variables may be set or removed for a whole recipe, or within a flow of recipe commands.
Set or override an environment variable: env "MY_VAR" = "..."
Remove an environment variable, so it becomes unavailable to the child process:
env-remove "MY_VAR".
Setting an environment variable in a recipe does not impact the environment variables seen by its dependencies or its dependents. Only processes executed by that specific recipe will see modifications to the environment.
Debugging
_WERK_ARTIFICIAL_DELAY: Number of milliseconds to wait between executing recipe commands. This may be used while debuggingwerkitself, especially rendering to the CLI.