Task — Fast Cross-Platform Build Tool for Modern Workflows
Task is a task runner and build tool written in Go. It uses simple YAML configuration as a modern, cross-platform alternative to Make — with better syntax, built-in variables, watch mode, and no platform-specific quirks.
What it is
Task is a task runner and build tool written in Go. It uses YAML configuration files as a modern, cross-platform alternative to GNU Make. You define tasks in a Taskfile.yml and run them with task <name>. It supports variables, dependencies between tasks, watch mode, and conditional execution without the platform-specific quirks that make Makefiles painful on Windows.
Task targets developers and DevOps engineers who need a simple build system that works identically on macOS, Linux, and Windows. It ships as a single binary with zero dependencies.
Why it saves time or tokens
Makefiles have implicit rules, tab-sensitive syntax, and platform differences that trip up both humans and AI assistants. Task's YAML syntax is explicit and portable. When asking an AI to generate a build configuration, YAML produces more reliable output than Makefile syntax. The watch mode (task --watch) re-runs tasks on file changes, eliminating manual rebuilds during development.
How to use
- Install Task:
go install github.com/go-task/task/v3/cmd/task@latestor download the binary - Create a
Taskfile.ymlin your project root - Run tasks with
task <name>ortask --watch <name>for file-watching mode
Example
version: '3'
tasks:
build:
desc: Build the application
cmds:
- go build -o bin/app ./cmd/app
sources:
- '**/*.go'
generates:
- bin/app
test:
desc: Run tests
deps: [build]
cmds:
- go test ./...
lint:
desc: Run linter
cmds:
- golangci-lint run
dev:
desc: Build and watch for changes
watch: true
cmds:
- task: build
| Feature | Make | Task |
|---|---|---|
| Config format | Makefile (tabs) | YAML |
| Windows support | Limited | Native |
| Watch mode | External tool | Built-in |
| Dependencies | Implicit rules | Explicit deps |
| Variables | $(VAR) syntax | Go template |
Related on TokRepo
- AI tools for automation — build tools and automation workflows on TokRepo
- AI tools for devops — DevOps tooling and CI/CD helpers
Common pitfalls
- Task does not support Make's implicit pattern rules; every task must be explicitly defined
- The
sourcesandgeneratesfields control caching; omitting them means tasks always re-run even when inputs have not changed - Task version 3 syntax differs from version 2; check the version field in your Taskfile.yml matches your installed Task binary
Frequently Asked Questions
Task uses YAML instead of Makefile syntax, works identically on all operating systems, and includes built-in watch mode. Make is more powerful for complex dependency graphs and has decades of ecosystem support. Task is better for teams that want simple, readable, cross-platform task definitions without learning Make's idiosyncratic syntax.
Yes. You can run tasks in parallel by listing them as dependencies or using the --parallel flag. Task also supports limiting concurrency. Dependencies declared in the deps field run in parallel by default, while commands in the cmds field run sequentially.
Task can define the build, test, and lint commands that your CI pipeline calls, but it does not replace the CI/CD system itself. Use Task to standardize commands locally and in CI. Your GitHub Actions or GitLab CI config calls task build instead of raw shell commands, keeping the logic in one place.
Watch mode monitors files specified in the sources field and re-runs the task when they change. Run task --watch build to rebuild automatically on code changes. This replaces external file-watching tools like nodemon or entr for development workflows.
Yes. Task supports environment variables through the env field on individual tasks, dotenv file loading, and Go template syntax for variable interpolation. You can reference environment variables in commands and conditionals. Task also supports loading .env files automatically.
Citations (3)
- Task GitHub— Task is a task runner written in Go using YAML configuration
- Task Docs— Task supports watch mode, variables, and cross-platform execution
- YAML Spec— YAML specification for configuration files
Related on TokRepo
Discussion
Related Assets
Hugging Face Tokenizers — Fast Text Tokenization for ML Pipelines
Hugging Face Tokenizers is a Rust-powered tokenization library with Python bindings that implements BPE, WordPiece, Unigram, and SentencePiece tokenizers with training and encoding speeds of gigabytes per second, used as the backbone for Transformers model tokenization.
Cleanlab — Find and Fix Label Errors in Any ML Dataset
Cleanlab is a data-centric AI Python library that automatically detects label errors, outliers, and data quality issues in classification and regression datasets, helping improve model accuracy by cleaning training data rather than tuning models.
Hugging Face Datasets — Access and Process ML Datasets at Scale
Hugging Face Datasets is a Python library for efficiently loading, processing, and sharing machine learning datasets with Apache Arrow-backed memory mapping, streaming support, and access to thousands of community datasets on the Hub.