feat(config): add environment variable support for all taskrc options by vmaerten · Pull Request #2607 · go-task/task

@vmaerten marked this pull request as ready for review

January 22, 2026 20:17
All taskrc configuration options can now be set via environment variables
with the TASK_ prefix. Priority order: CLI flag > env var > taskrc > default.

New environment variables:
- TASK_VERBOSE, TASK_COLOR, TASK_DISABLE_FUZZY, TASK_CONCURRENCY, TASK_FAILFAST
- TASK_REMOTE_INSECURE, TASK_REMOTE_OFFLINE, TASK_REMOTE_TIMEOUT
- TASK_REMOTE_CACHE_EXPIRY, TASK_REMOTE_CACHE_DIR, TASK_REMOTE_TRUSTED_HOSTS

TASK_REMOTE_DIR remains supported for backward compatibility.
- Document TASK_VERBOSE, TASK_COLOR, TASK_DISABLE_FUZZY, TASK_CONCURRENCY,
  TASK_FAILFAST in environment.md
- Add environment variable references to remote-taskfiles.md for all
  remote config options
- Add cross-page links between cli.md, config.md, and environment.md
- Fix configuration priority order: config files > env vars > CLI flags

@vmaerten

Add environment variable configuration for three CLI flags:
- TASK_DRY: enable dry-run mode without executing tasks
- TASK_ASSUME_YES: automatically answer yes to prompts
- TASK_SILENT: disable command echoing (also supports taskrc config)

The silent flag gets full support with both taskrc configuration
and environment variable, while dry and yes are env-var only.

@vmaerten

vmaerten added a commit that referenced this pull request

Feb 18, 2026

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
…go-task#2607)

Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>