Skip to content

Conversation

@vmaerten
Copy link
Member

Summary

Add environment variable support for all taskrc configuration options. Allow users to configure Task via TASK_* environment variables (e.g., TASK_VERBOSE, TASK_COLOR, TASK_CONCURRENCY) with priority: CLI flags > env vars > taskrc config > defaults.

  • Add typed env var helpers (GetTaskEnvBool, GetTaskEnvInt, GetTaskEnvDuration, GetTaskEnvString, GetTaskEnvStringSlice) in internal/env
  • Update getConfig to check env vars before falling back to taskrc
  • Support all existing taskrc options: VERBOSE, COLOR, CONCURRENCY, FAILFAST, DISABLE_FUZZY, REMOTE_* (insecure, offline, timeout, cache-expiry, cache-dir, trusted-hosts)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants