ConfigsApr 13, 2026·3 min read

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.

TL;DR
Task replaces Make with simple YAML config, built-in variables, and cross-platform support.
§01

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.

§02

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.

§03

How to use

  1. Install Task: go install github.com/go-task/task/v3/cmd/task@latest or download the binary
  2. Create a Taskfile.yml in your project root
  3. Run tasks with task <name> or task --watch <name> for file-watching mode
§04

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
FeatureMakeTask
Config formatMakefile (tabs)YAML
Windows supportLimitedNative
Watch modeExternal toolBuilt-in
DependenciesImplicit rulesExplicit deps
Variables$(VAR) syntaxGo template
§05

Related on TokRepo

§06

Common pitfalls

  • Task does not support Make's implicit pattern rules; every task must be explicitly defined
  • The sources and generates fields 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

How does Task compare to Make?+

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.

Does Task support parallel task execution?+

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.

Can Task replace CI/CD pipeline definitions?+

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.

What is watch mode in Task?+

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.

Does Task support environment variables?+

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

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets