Skip to content

Guide · Open source

How to use Task: write a Taskfile and run project tasks

Updated · written with AI from the project's own documentation and checked against our catalogue data

Task (go-task/task) is an open-source command-line tool that runs project tasks such as builds, tests and scripts. You describe those tasks in a file called a Taskfile, and Task runs them on Linux, macOS, Windows and other systems. This guide explains what Task is for, how to get the source, and how the Taskfile workflow fits together.

Taskgo-task/task · ★ 16.3k · MIT

Quick start

  1. 1Clone the repository. Run git clone https://github.com/go-task/task to get the source code.
  2. 2Read the installation docs. Open taskfile.dev/docs/installation to see how to set Task up on your system.
  3. 3Follow the getting started guide. Work through taskfile.dev/docs/getting-started to learn the basic workflow.
  4. 4Create a Taskfile. Add a Taskfile to your project that defines the tasks you repeat, such as build and test.
  5. 5Run your tasks. Use Task to run the named tasks from your Taskfile on your machine.

What Task is and who it is for

Task is a build tool inspired by Make, designed for modern workflows. Its purpose is similar to Make: it gives a project a set of named commands for building, testing and running scripts.

It suits developers who want a simpler alternative to Makefiles for project scripts, teams that work across Linux, macOS and Windows and need one task runner, and people automating repetitive build, test or deployment steps.

  • Good fit: project scripts you run repeatedly, shared across a team
  • Good fit: projects that already use Go or want a single binary with no runtime dependencies
  • Poor fit: a one-off shell script, since a Taskfile adds setup overhead
  • Poor fit: projects that depend on Makefile-specific syntax you do not want to rewrite

Get the Task source from GitHub

The source is hosted on GitHub. The README's install instruction is to clone the repository, so that is the step shown here. The project's documentation covers installation in more detail on its homepage, taskfile.dev.

git clone https://github.com/go-task/task

Understand the Taskfile

You describe the tasks your project needs in a Taskfile. Task reads that file and runs the tasks you name. The README does not cover Taskfile syntax, so check the docs at taskfile.dev/docs/guide for the exact format before writing one.

  • Write one named task per repeatable action, such as build, test or deploy
  • Keep the Taskfile in the project so every contributor runs the same commands
  • Use the official docs for syntax and options

Run tasks on different operating systems

Because Task is cross-platform, the same Taskfile is meant to run on Linux, macOS, Windows and other systems. This is the main reason teams use it as one shared task runner instead of separate scripts per machine.

Check the docs for platform-specific details before relying on a particular command in your Taskfile.

Decide whether Task fits your project

Task is one of several options for project automation. The README lists GNU Make, just, Mage and npm scripts as comparable projects. Pick Task when you want a readable alternative to Makefiles and a tool that works the same across operating systems. Stay with a plain shell script when the job runs once.

  • GNU Make: the long-standing standard, with its own syntax
  • just, Mage and npm scripts: other ways to run project commands
  • Task: a Make-inspired runner aimed at modern, cross-platform workflows

What people use it for

  • Replacing a project Makefile with a Taskfile for build and test commands
  • Sharing one set of project scripts across Linux, macOS and Windows developers
  • Automating repetitive build, test or deployment steps in a Go project

Frequently asked questions

Is Task free to use?

Yes. Task is open source and released under the MIT licence, which allows free use. The licence is stated in the project's metadata.

What language is Task written in?

Task is written in Go. The project is designed to ship as a single binary with no runtime dependencies, according to the project description.

What operating systems does Task support?

The README describes Task as cross-platform and says it runs across Linux, macOS, Windows and other systems.

Is Task a replacement for Make?

Task is inspired by Make and serves a similar purpose of running project build tasks. It is a simpler alternative for people who do not want to write Makefiles, but it does not use Makefile syntax.

What are alternatives to Task?

Comparable options include GNU Make, just, Mage and npm scripts. Choose based on your language stack and how much you want to rewrite existing build files.

Is Task worth it for a small one-off script?

Probably not. A Taskfile adds setup overhead, so a plain shell script is a better fit for a one-off job.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Task suits developers and teams who want a readable, cross-platform alternative to Makefiles for repeatable project tasks. Skip it for one-off scripts, for projects that depend on Makefile syntax, or for non-developers.

Install options & downloads